Skip to contentSkip to conversation

drm/panel: simplify the return expression of td028ttec1_prepare

PATCH Applied Qinglang Miao 2 participants 2 messages Sep 21, 2020 – Sep 24, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/panel: simplify the return expression of td028ttec1_prepare

Simplify the return expression.

---
 drivers/gpu/drm/panel/panel-tpo-td028ttec1.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
drivers/gpu/drm/panel/panel-tpo-td028ttec1.c +1 -6
index 037c14fd6..ba0c00d1a 100644
@@ -242,13 +242,8 @@ static int td028ttec1_prepare(struct drm_panel *panel)
 static int td028ttec1_enable(struct drm_panel *panel)
 {
 	struct td028ttec1_panel *lcd = to_td028ttec1_device(panel);
-	int ret;
 
-	ret = jbt_ret_write_0(lcd, JBT_REG_DISPLAY_ON, NULL);
-	if (ret)
-		return ret;
-
-	return 0;
+	return jbt_ret_write_0(lcd, JBT_REG_DISPLAY_ON, NULL);
 }
 
 static int td028ttec1_disable(struct drm_panel *panel)
Signature · 1 line
2.23.0
Applied
#1 lore raw

Hi Qinglang

Quoted 3 lines · Qinglang Miao

Simplify the return expression.

Thanks, applied to drm-misc-next.

Sam

Quoted 25 lines
---
 drivers/gpu/drm/panel/panel-tpo-td028ttec1.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
drivers/gpu/drm/panel/panel-tpo-td028ttec1.c +1 -6
index 037c14fd6..ba0c00d1a 100644
@@ -242,13 +242,8 @@ static int td028ttec1_prepare(struct drm_panel *panel)
 static int td028ttec1_enable(struct drm_panel *panel)
 {
 	struct td028ttec1_panel *lcd = to_td028ttec1_device(panel);
-	int ret;
 
-	ret = jbt_ret_write_0(lcd, JBT_REG_DISPLAY_ON, NULL);
-	if (ret)
-		return ret;
-
-	return 0;
+	return jbt_ret_write_0(lcd, JBT_REG_DISPLAY_ON, NULL);
 }
 
 static int td028ttec1_disable(struct drm_panel *panel)
Signature · 1 line
2.23.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel