diff options
author | Qinglang Miao <miaoqinglang@huawei.com> | 2020-10-31 04:18:56 +0300 |
---|---|---|
committer | Sam Ravnborg <sam@ravnborg.org> | 2020-11-08 12:55:15 +0300 |
commit | f2e66f212a9de04afc2caa5ec79057c0ac75c728 (patch) | |
tree | 11d2f625b44178a04db1dc272a3669b0058ca26b /drivers/gpu/drm/panel | |
parent | 5f33e64110f7ea281e777d11375670250b1a070a (diff) | |
download | linux-f2e66f212a9de04afc2caa5ec79057c0ac75c728.tar.xz |
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 <miaoqinglang@huawei.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20201031011856.137307-1-miaoqinglang@huawei.com
Diffstat (limited to 'drivers/gpu/drm/panel')
-rw-r--r-- | drivers/gpu/drm/panel/panel-simple.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index 1327df0bddbd..372a9bc14a22 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -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; |