linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] drm/panel: simplify the return expression of td028ttec1_prepare
@ 2020-09-21 13:10 Qinglang Miao
  2020-09-24 19:46 ` Sam Ravnborg
  0 siblings, 1 reply; 2+ messages in thread
From: Qinglang Miao @ 2020-09-21 13:10 UTC (permalink / raw)
  To: Thierry Reding, Sam Ravnborg, David Airlie, Daniel Vetter
  Cc: dri-devel, linux-kernel, Qinglang Miao

Simplify the return expression.

Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
---
 drivers/gpu/drm/panel/panel-tpo-td028ttec1.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/panel/panel-tpo-td028ttec1.c b/drivers/gpu/drm/panel/panel-tpo-td028ttec1.c
index 037c14fd6..ba0c00d1a 100644
--- a/drivers/gpu/drm/panel/panel-tpo-td028ttec1.c
+++ b/drivers/gpu/drm/panel/panel-tpo-td028ttec1.c
@@ -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)
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH -next] drm/panel: simplify the return expression of td028ttec1_prepare
  2020-09-21 13:10 [PATCH -next] drm/panel: simplify the return expression of td028ttec1_prepare Qinglang Miao
@ 2020-09-24 19:46 ` Sam Ravnborg
  0 siblings, 0 replies; 2+ messages in thread
From: Sam Ravnborg @ 2020-09-24 19:46 UTC (permalink / raw)
  To: Qinglang Miao
  Cc: Thierry Reding, David Airlie, Daniel Vetter, dri-devel, linux-kernel

Hi Qinglang

On Mon, Sep 21, 2020 at 09:10:18PM +0800, Qinglang Miao wrote:
> Simplify the return expression.
> 
> Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>


Thanks, applied to drm-misc-next.

	Sam

> ---
>  drivers/gpu/drm/panel/panel-tpo-td028ttec1.c | 7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/panel/panel-tpo-td028ttec1.c b/drivers/gpu/drm/panel/panel-tpo-td028ttec1.c
> index 037c14fd6..ba0c00d1a 100644
> --- a/drivers/gpu/drm/panel/panel-tpo-td028ttec1.c
> +++ b/drivers/gpu/drm/panel/panel-tpo-td028ttec1.c
> @@ -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)
> -- 
> 2.23.0

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-09-24 19:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-21 13:10 [PATCH -next] drm/panel: simplify the return expression of td028ttec1_prepare Qinglang Miao
2020-09-24 19:46 ` Sam Ravnborg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).