[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210126135511.10989-1-dong.menglong@zte.com.cn>
Date: Tue, 26 Jan 2021 05:55:11 -0800
From: menglong8.dong@...il.com
To: tomba@...nel.org
Cc: airlied@...ux.ie, daniel@...ll.ch, sebastian.reichel@...labora.com,
laurent.pinchart@...asonboard.com, dri-devel@...ts.freedesktop.org,
linux-kernel@...r.kernel.org,
Menglong Dong <dong.menglong@....com.cn>
Subject: [PATCH] drm/omap: dsi: fix unreachable code in dsi_vc_send_short()
From: Menglong Dong <dong.menglong@....com.cn>
The 'r' in dsi_vc_send_short() is of type 'unsigned int', so the
'r < 0' can't be true.
Fix this by introducing a 'err' insteaded.
Fixes: 1ed6253856cb
("drm/omap: dsi: switch dsi_vc_send_long/short to mipi_dsi_msg")
Signed-off-by: Menglong Dong <dong.menglong@....com.cn>
---
drivers/gpu/drm/omapdrm/dss/dsi.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c b/drivers/gpu/drm/omapdrm/dss/dsi.c
index 8e11612f5fe1..febcc87ddfe1 100644
--- a/drivers/gpu/drm/omapdrm/dss/dsi.c
+++ b/drivers/gpu/drm/omapdrm/dss/dsi.c
@@ -2149,11 +2149,12 @@ static int dsi_vc_send_short(struct dsi_data *dsi, int vc,
const struct mipi_dsi_msg *msg)
{
struct mipi_dsi_packet pkt;
+ int err;
u32 r;
- r = mipi_dsi_create_packet(&pkt, msg);
- if (r < 0)
- return r;
+ err = mipi_dsi_create_packet(&pkt, msg);
+ if (err)
+ return err;
WARN_ON(!dsi_bus_is_locked(dsi));
--
2.25.1
Powered by blists - more mailing lists