37 lines
1.1 KiB
Diff
37 lines
1.1 KiB
Diff
From 1b68d522bf99b613dffc0587828e71f83fd2c2ce Mon Sep 17 00:00:00 2001
|
|
From: Samuel Holland <samuel@sholland.org>
|
|
Date: Sun, 26 Apr 2020 14:38:15 -0500
|
|
Subject: [PATCH 189/464] media: cedrus: Fix failure to clean up hardware on
|
|
probe failure
|
|
|
|
Signed-off-by: Samuel Holland <samuel@sholland.org>
|
|
---
|
|
drivers/staging/media/sunxi/cedrus/cedrus.c | 4 +++-
|
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/drivers/staging/media/sunxi/cedrus/cedrus.c b/drivers/staging/media/sunxi/cedrus/cedrus.c
|
|
index 8e248d4a0aec..a0f9f4a5b03a 100644
|
|
--- a/drivers/staging/media/sunxi/cedrus/cedrus.c
|
|
+++ b/drivers/staging/media/sunxi/cedrus/cedrus.c
|
|
@@ -478,7 +478,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;
|
|
@@ -539,6 +539,8 @@ static int cedrus_probe(struct platform_device *pdev)
|
|
v4l2_m2m_release(dev->m2m_dev);
|
|
err_v4l2:
|
|
v4l2_device_unregister(&dev->v4l2_dev);
|
|
+err_hw:
|
|
+ cedrus_hw_remove(dev);
|
|
|
|
return ret;
|
|
}
|
|
--
|
|
2.34.1
|
|
|