From: Wei Yongjun <yongjun_wei@xxxxxxxxxxxxxxxxx> Add the missing platform_driver_unregister() before return from panel_simple_init() in the error handling case. Signed-off-by: Wei Yongjun <yongjun_wei@xxxxxxxxxxxxxxxxx> --- drivers/gpu/drm/panel/panel-simple.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index 3e611af..d801162 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -476,10 +476,14 @@ 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) - return err; + goto err_dsi_driver_register; } return 0; + +err_dsi_driver_register: + platform_driver_unregister(&panel_simple_platform_driver); + return err; } module_init(panel_simple_init); _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/dri-devel