media: coda: Fix runtime PM imbalance in coda_probe
authorDinghao Liu <dinghao.liu@zju.edu.cn>
Mon, 25 May 2020 13:02:06 +0000 (15:02 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Sun, 27 Sep 2020 08:51:14 +0000 (10:51 +0200)
When coda_firmware_request() 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: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/platform/coda/coda-common.c

index eeba6c0..87a2c70 100644 (file)
@@ -3264,6 +3264,8 @@ static int coda_probe(struct platform_device *pdev)
        return 0;
 
 err_alloc_workqueue:
+       pm_runtime_disable(&pdev->dev);
+       pm_runtime_put_noidle(&pdev->dev);
        destroy_workqueue(dev->workqueue);
 err_v4l2_register:
        v4l2_device_unregister(&dev->v4l2_dev);