[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20200722014939.4047-1-bernard@vivo.com>
Date: Wed, 22 Jul 2020 09:49:39 +0800
From: Bernard Zhao <bernard@...o.com>
To: Jagan Teki <jagan@...rulasolutions.com>,
Thierry Reding <thierry.reding@...il.com>,
Sam Ravnborg <sam@...nborg.org>,
David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>,
dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Cc: opensource.kernel@...o.com, Bernard Zhao <bernard@...o.com>
Subject: [PATCH] drm/panel: remove meaningless if(ret) check code.
The function drm_panel_add always returns true.
So if(ret) check code will never run into error branch.
Remove these check will make the code a bit readable.
Signed-off-by: Bernard Zhao <bernard@...o.com>
---
drivers/gpu/drm/panel/panel-feiyang-fy07024di26a30d.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/panel/panel-feiyang-fy07024di26a30d.c b/drivers/gpu/drm/panel/panel-feiyang-fy07024di26a30d.c
index 95b789ab9d29..2c168a405928 100644
--- a/drivers/gpu/drm/panel/panel-feiyang-fy07024di26a30d.c
+++ b/drivers/gpu/drm/panel/panel-feiyang-fy07024di26a30d.c
@@ -225,9 +225,7 @@ static int feiyang_dsi_probe(struct mipi_dsi_device *dsi)
if (ret)
return ret;
- ret = drm_panel_add(&ctx->panel);
- if (ret < 0)
- return ret;
+ drm_panel_add(&ctx->panel);
dsi->mode_flags = MIPI_DSI_MODE_VIDEO_BURST;
dsi->format = MIPI_DSI_FMT_RGB888;
--
2.17.1
Powered by blists - more mailing lists