Skip to contentSkip to conversation

drm/mxsfb: miss err handle in probe

PATCH In review Bernard Zhao 2 participants 2 messages Jun 11, 2020 – Jul 20, 2020

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/mxsfb: miss err handle in probe

There are three err return values in drm_fbdev_generic_setup. In mxsfb_probe we called this function, but didn`t handle the return value, this change is to add err handle, maybe make code a bit more readable.

---
 drivers/gpu/drm/mxsfb/mxsfb_drv.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/mxsfb/mxsfb_drv.c +3 -1
index 497cf443a9af..a45f3b85f725 100644
@@ -415,7 +415,9 @@ static int mxsfb_probe(struct platform_device *pdev)
 	if (ret)
 		goto err_unload;
 
-	drm_fbdev_generic_setup(drm, 32);
+	ret = drm_fbdev_generic_setup(drm, 32);
+	if (ret)
+		goto err_unload;
 
 	return 0;
 
Signature · 7 lines
2.17.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
maintainer
#1 lore raw
Quoted 4 lines · Bernard Zhao

There are three err return values in drm_fbdev_generic_setup. In mxsfb_probe we called this function, but didn`t handle the return value, this change is to add err handle, maybe make code a bit more readable.

This got recently changed, so I guess checking the return value isn't required anymore:
https://patchwork.freedesktop.org/patch/msgid/[email protected]

--
Stefan

Quoted 12 lines
---
 drivers/gpu/drm/mxsfb/mxsfb_drv.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/mxsfb/mxsfb_drv.c +0 -0
index 497cf443a9af..a45f3b85f725 100644

drivers/gpu/drm/mxsfb/mxsfb_drv.c static int mxsfb_probe(struct platform_device *pdev) · line 422

Quoted 9 lines
drivers/gpu/drm/mxsfb/mxsfb_drv.c +3 -1
@@ -415,7 +415,9 @@ static int mxsfb_probe(struct platform_device *pdev)
 	if (ret)
 		goto err_unload;
 
-	drm_fbdev_generic_setup(drm, 32);
+	ret = drm_fbdev_generic_setup(drm, 32);
+	if (ret)
+		goto err_unload;
 
 	return 0;

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel