diff options
author | Fabio Estevam <fabio.estevam@nxp.com> | 2016-10-04 18:41:37 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-10-24 23:34:45 +0300 |
commit | c762ff1f7e3b09293c22ce62135ef550c1b3327c (patch) | |
tree | 212b5c7771608b7f86d2ffe9412f98c0445950a7 /drivers/media/platform/coda | |
parent | 69fd825c17a9f0e2ad939ee701c64242d181cdb9 (diff) | |
download | linux-c762ff1f7e3b09293c22ce62135ef550c1b3327c.tar.xz |
[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: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/platform/coda')
-rw-r--r-- | drivers/media/platform/coda/coda-common.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/media/platform/coda/coda-common.c b/drivers/media/platform/coda/coda-common.c index c39718a63e5e..9e6bdafa16f5 100644 --- a/drivers/media/platform/coda/coda-common.c +++ b/drivers/media/platform/coda/coda-common.c @@ -2295,8 +2295,13 @@ static int coda_probe(struct platform_device *pdev) 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; |