mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-13 01:08:50 +00:00
[media] coda: fix error path in case of missing pdata on non-DT platform
If we bail out this early, v4l2_device_register() has not been called yet, so no need to call v4l2_device_unregister(). Fixes: b7bd660a51f0 ("[media] coda: Call v4l2_device_unregister() from a single location") Reported-by: Michael Olbrich <m.olbrich@pengutronix.de> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
This commit is contained in:
parent
31e717dba1
commit
bc717d5e92
@ -2178,14 +2178,12 @@ static int coda_probe(struct platform_device *pdev)
|
|||||||
|
|
||||||
pdev_id = of_id ? of_id->data : platform_get_device_id(pdev);
|
pdev_id = of_id ? of_id->data : platform_get_device_id(pdev);
|
||||||
|
|
||||||
if (of_id) {
|
if (of_id)
|
||||||
dev->devtype = of_id->data;
|
dev->devtype = of_id->data;
|
||||||
} else if (pdev_id) {
|
else if (pdev_id)
|
||||||
dev->devtype = &coda_devdata[pdev_id->driver_data];
|
dev->devtype = &coda_devdata[pdev_id->driver_data];
|
||||||
} else {
|
else
|
||||||
ret = -EINVAL;
|
return -EINVAL;
|
||||||
goto err_v4l2_register;
|
|
||||||
}
|
|
||||||
|
|
||||||
spin_lock_init(&dev->irqlock);
|
spin_lock_init(&dev->irqlock);
|
||||||
INIT_LIST_HEAD(&dev->instances);
|
INIT_LIST_HEAD(&dev->instances);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user