media: cedrus: Fix failure to clean up hardware on probe failure
Signed-off-by: Samuel Holland <samuel@sholland.org>
This commit is contained in:
parent
541451e333
commit
05604793ce
@ -472,7 +472,7 @@ static int cedrus_probe(struct platform_device *pdev)
|
||||
ret = v4l2_device_register(&pdev->dev, &dev->v4l2_dev);
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "Failed to register V4L2 device\n");
|
||||
return ret;
|
||||
goto err_hw;
|
||||
}
|
||||
|
||||
vfd = &dev->vfd;
|
||||
@ -533,6 +533,8 @@ err_m2m:
|
||||
v4l2_m2m_release(dev->m2m_dev);
|
||||
err_v4l2:
|
||||
v4l2_device_unregister(&dev->v4l2_dev);
|
||||
err_hw:
|
||||
cedrus_hw_remove(dev);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user