diff options
author | Bernard Zhao <bernard@vivo.com> | 2020-08-01 20:02:13 +0800 |
---|---|---|
committer | Sam Ravnborg <sam@ravnborg.org> | 2020-08-02 08:59:06 +0200 |
commit | c3ee8c65f63799b02e1fb828bac99fd5008fb565 (patch) | |
tree | 98d499bd08fe087dcd695457fb9ec22e4880912b /drivers/gpu/drm/panel/panel-samsung-s6e63j0x03.c | |
parent | 1a3fb590856a9d7e8392d970fc07791b6703de94 (diff) |
drm/panel: remove return value of function drm_panel_add
The function "int drm_panel_add(struct drm_panel *panel)"
always returns 0, this return value is meaningless.
Also, there is no need to check return value which calls
"drm_panel_add and", error branch code will never run.
Signed-off-by: Bernard Zhao <bernard@vivo.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20200801120216.8488-1-bernard@vivo.com
Diffstat (limited to 'drivers/gpu/drm/panel/panel-samsung-s6e63j0x03.c')
-rw-r--r-- | drivers/gpu/drm/panel/panel-samsung-s6e63j0x03.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/gpu/drm/panel/panel-samsung-s6e63j0x03.c b/drivers/gpu/drm/panel/panel-samsung-s6e63j0x03.c index 1247656d73bf..7a43eb3545cf 100644 --- a/drivers/gpu/drm/panel/panel-samsung-s6e63j0x03.c +++ b/drivers/gpu/drm/panel/panel-samsung-s6e63j0x03.c @@ -479,9 +479,7 @@ static int s6e63j0x03_probe(struct mipi_dsi_device *dsi) ctx->bl_dev->props.brightness = DEFAULT_BRIGHTNESS; ctx->bl_dev->props.power = FB_BLANK_POWERDOWN; - ret = drm_panel_add(&ctx->panel); - if (ret < 0) - goto unregister_backlight; + drm_panel_add(&ctx->panel); ret = mipi_dsi_attach(dsi); if (ret < 0) @@ -491,8 +489,6 @@ static int s6e63j0x03_probe(struct mipi_dsi_device *dsi) remove_panel: drm_panel_remove(&ctx->panel); - -unregister_backlight: backlight_device_unregister(ctx->bl_dev); return ret; |