[PATCH] media: rockchip: rga: Fix probe rga_parse_dt bugs
Jarrah Gosbell
kernel at undef.tools
Sat Aug 13 21:08:07 PDT 2022
From: Ondrej Jirman <megi at xff.cz>
rga_parse_dt is missing a error return, so if some of the resources
return DEFER_PROBE, probe will succeed without these resources.
Signed-off-by: Ondrej Jirman <megi at xff.cz>
Signed-off-by: Jarrah Gosbell <kernel at undef.tools>
---
drivers/media/platform/rockchip/rga/rga.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/media/platform/rockchip/rga/rga.c b/drivers/media/platform/rockchip/rga/rga.c
index 2f8df74ad0fd..b88dd7ed2036 100644
--- a/drivers/media/platform/rockchip/rga/rga.c
+++ b/drivers/media/platform/rockchip/rga/rga.c
@@ -815,8 +815,10 @@ static int rga_probe(struct platform_device *pdev)
mutex_init(&rga->mutex);
ret = rga_parse_dt(rga);
- if (ret)
+ if (ret) {
dev_err(&pdev->dev, "Unable to parse OF data\n");
+ return ret;
+ }
pm_runtime_enable(rga->dev);
--
2.35.1
More information about the Linux-rockchip
mailing list