* [PATCH] drm/panel: add missing platform_driver_unregister() on error path
@ 2020-11-11 6:44 Yang Yingliang
2020-11-11 7:20 ` Sam Ravnborg
0 siblings, 1 reply; 2+ messages in thread
From: Yang Yingliang @ 2020-11-11 6:44 UTC (permalink / raw)
To: dri-devel, linux-kernel; +Cc: thierry.reding, sam, yangyingliang
If mipi_dsi_driver_register() failed, platform_driver_unregister()
need be called.
Fixes: 210fcd9d9cf1 ("drm/panel: Add support for Panasonic VVX10F004B0")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
drivers/gpu/drm/panel/panel-simple.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
index 2be358fb46f7..2966ac13c538 100644
--- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -4644,8 +4644,10 @@ static int __init panel_simple_init(void)
if (IS_ENABLED(CONFIG_DRM_MIPI_DSI)) {
err = mipi_dsi_driver_register(&panel_simple_dsi_driver);
- if (err < 0)
+ if (err < 0) {
+ platform_driver_unregister(&panel_simple_platform_driver);
return err;
+ }
}
return 0;
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drm/panel: add missing platform_driver_unregister() on error path
2020-11-11 6:44 [PATCH] drm/panel: add missing platform_driver_unregister() on error path Yang Yingliang
@ 2020-11-11 7:20 ` Sam Ravnborg
0 siblings, 0 replies; 2+ messages in thread
From: Sam Ravnborg @ 2020-11-11 7:20 UTC (permalink / raw)
To: Yang Yingliang; +Cc: dri-devel, linux-kernel, thierry.reding
Hi Yang,
On Wed, Nov 11, 2020 at 02:44:25PM +0800, Yang Yingliang wrote:
> If mipi_dsi_driver_register() failed, platform_driver_unregister()
> need be called.
>
> Fixes: 210fcd9d9cf1 ("drm/panel: Add support for Panasonic VVX10F004B0")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Thanks for the patch but this is already fixed in drm-misx-next.
See:
commit f2e66f212a9de04afc2caa5ec79057c0ac75c728
drm: panel: simple: add missing platform_driver_unregister() in panel_simple_init
Sam
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-11-11 7:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-11 6:44 [PATCH] drm/panel: add missing platform_driver_unregister() on error path Yang Yingliang
2020-11-11 7:20 ` Sam Ravnborg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).