Commit c762ff1f authored by Fabio Estevam's avatar Fabio Estevam Committed by Mauro Carvalho Chehab

[media] coda: fix the error path in coda_probe()

In the case of coda_firmware_request() failure, we should release the
prevously acquired resources.
Signed-off-by: default avatarFabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 69fd825c
...@@ -2295,8 +2295,13 @@ static int coda_probe(struct platform_device *pdev) ...@@ -2295,8 +2295,13 @@ static int coda_probe(struct platform_device *pdev)
pm_runtime_set_active(&pdev->dev); pm_runtime_set_active(&pdev->dev);
pm_runtime_enable(&pdev->dev); pm_runtime_enable(&pdev->dev);
return coda_firmware_request(dev); ret = coda_firmware_request(dev);
if (ret)
goto err_alloc_workqueue;
return 0;
err_alloc_workqueue:
destroy_workqueue(dev->workqueue);
err_v4l2_register: err_v4l2_register:
v4l2_device_unregister(&dev->v4l2_dev); v4l2_device_unregister(&dev->v4l2_dev);
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment