Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 74d08d55 authored by Fabio Estevam's avatar Fabio Estevam Committed by Mauro Carvalho Chehab
Browse files

[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: default avatarFabio Estevam <fabio.estevam@freescale.com>
Acked-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent b7bd660a
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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);