media: smiapp: Fix runtime PM imbalance on error
authorDinghao Liu <dinghao.liu@zju.edu.cn>
Mon, 25 May 2020 08:19:58 +0000 (10:19 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tue, 23 Jun 2020 13:13:45 +0000 (15:13 +0200)
When v4l2_async_register_subdev_sensor_common() returns
an error code, a pairing runtime PM usage counter
decrement is needed to keep the counter balanced.

Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/i2c/smiapp/smiapp-core.c

index 5e4f6a2..0a8d274 100644 (file)
@@ -3103,6 +3103,7 @@ static int smiapp_probe(struct i2c_client *client)
        return 0;
 
 out_disable_runtime_pm:
+       pm_runtime_put_noidle(&client->dev);
        pm_runtime_disable(&client->dev);
 
 out_media_entity_cleanup: