drm/panel: panel-dsi-cm: remove extra 'if'
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Tue, 15 Dec 2020 10:46:44 +0000 (12:46 +0200)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Tue, 15 Dec 2020 14:17:31 +0000 (16:17 +0200)
We have a useless 'if' in the dsicm_bl_update_status(), a left over from
the conversion to DRM model. Drop the if.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201215104657.802264-72-tomi.valkeinen@ti.com
drivers/gpu/drm/panel/panel-dsi-cm.c

index 067745f..f5240fd 100644 (file)
@@ -202,11 +202,9 @@ static int dsicm_bl_update_status(struct backlight_device *dev)
 
        mutex_lock(&ddata->lock);
 
-       if (ddata->enabled) {
-               if (!r)
-                       r = dsicm_dcs_write_1(
-                               ddata, MIPI_DCS_SET_DISPLAY_BRIGHTNESS, level);
-       }
+       if (ddata->enabled)
+               r = dsicm_dcs_write_1(ddata, MIPI_DCS_SET_DISPLAY_BRIGHTNESS,
+                                     level);
 
        mutex_unlock(&ddata->lock);