mirror of
https://github.com/torvalds/linux.git
synced 2026-09-25 21:21:09 -04:00
drm: panel: simple: add missing platform_driver_unregister() in panel_simple_init
Add the missing platform_driver_unregister() before return from panel_simple_init in the error handling case when failed to register panel_simple_dsi_driver with CONFIG_DRM_MIPI_DSI enabled. Signed-off-by: Qinglang Miao <[email protected]> Signed-off-by: Sam Ravnborg <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
This commit is contained in:
committed by
Sam Ravnborg
parent
5f33e64110
commit
f2e66f212a
@@ -4675,8 +4675,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;
|
||||
|
||||
Reference in New Issue
Block a user