In the case of coda_firmware_request() failure, we should release the
prevously acquired resources.
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
pm_runtime_set_active(&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:
v4l2_device_unregister(&dev->v4l2_dev);
return ret;