summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2014-10-04 19:40:51 (GMT)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2014-11-03 19:55:22 (GMT)
commit74d08d55ed978bd60d4774083f700e6630fe42a5 (patch)
treef7b4e37a76375eed607d615456bb769cdadaf954 /drivers
parentb7bd660a51f0cef91d8d544192a5b96c8854e775 (diff)
downloadlinux-74d08d55ed978bd60d4774083f700e6630fe42a5.tar.xz
[media] coda: Unregister v4l2 upon alloc_workqueue() error
If alloc_workqueue() fails, we should go to the 'err_v4l2_register' label, which will unregister the v4l2 device. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/platform/coda/coda-common.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/media/platform/coda/coda-common.c b/drivers/media/platform/coda/coda-common.c
index 1871f05..42b4630 100644
--- a/drivers/media/platform/coda/coda-common.c
+++ b/drivers/media/platform/coda/coda-common.c
@@ -2152,7 +2152,8 @@ static int coda_probe(struct platform_device *pdev)
dev->workqueue = alloc_workqueue("coda", WQ_UNBOUND | WQ_MEM_RECLAIM, 1);
if (!dev->workqueue) {
dev_err(&pdev->dev, "unable to alloc workqueue\n");
- return -ENOMEM;
+ ret = -ENOMEM;
+ goto err_v4l2_register;
}
platform_set_drvdata(pdev, dev);