From: menglong8.dong@gmail.com To: tomba@kernel.org, sebastian.reichel@collabora.com Cc: airlied@linux.ie, daniel@ffwll.ch, laurent.pinchart@ideasonboard.com, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Menglong Dong <dong.menglong@zte.com.cn> Subject: [PATCH v2] drm/omap: dsi: fix unreachable code in dsi_vc_send_short() Date: Tue, 26 Jan 2021 17:51:17 -0800 [thread overview] Message-ID: <20210127015117.23267-1-dong.menglong@zte.com.cn> (raw) From: Menglong Dong <dong.menglong@zte.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' of type 'int' insteaded. Fixes: 1ed6253856cb ("drm/omap: dsi: switch dsi_vc_send_long/short to mipi_dsi_msg") Signed-off-by: Menglong Dong <dong.menglong@zte.com.cn> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com> --- v2: - remove word wrap in 'Fixes' tag --- 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
WARNING: multiple messages have this Message-ID (diff)
From: menglong8.dong@gmail.com To: tomba@kernel.org, sebastian.reichel@collabora.com Cc: Menglong Dong <dong.menglong@zte.com.cn>, airlied@linux.ie, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, laurent.pinchart@ideasonboard.com Subject: [PATCH v2] drm/omap: dsi: fix unreachable code in dsi_vc_send_short() Date: Tue, 26 Jan 2021 17:51:17 -0800 [thread overview] Message-ID: <20210127015117.23267-1-dong.menglong@zte.com.cn> (raw) From: Menglong Dong <dong.menglong@zte.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' of type 'int' insteaded. Fixes: 1ed6253856cb ("drm/omap: dsi: switch dsi_vc_send_long/short to mipi_dsi_msg") Signed-off-by: Menglong Dong <dong.menglong@zte.com.cn> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com> --- v2: - remove word wrap in 'Fixes' tag --- 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 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
next reply other threads:[~2021-01-27 4:16 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-01-27 1:51 menglong8.dong [this message] 2021-01-27 1:51 ` [PATCH v2] drm/omap: dsi: fix unreachable code in dsi_vc_send_short() menglong8.dong 2021-01-27 14:23 ` Tomi Valkeinen 2021-01-27 14:23 ` Tomi Valkeinen
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20210127015117.23267-1-dong.menglong@zte.com.cn \ --to=menglong8.dong@gmail.com \ --cc=airlied@linux.ie \ --cc=daniel@ffwll.ch \ --cc=dong.menglong@zte.com.cn \ --cc=dri-devel@lists.freedesktop.org \ --cc=laurent.pinchart@ideasonboard.com \ --cc=linux-kernel@vger.kernel.org \ --cc=sebastian.reichel@collabora.com \ --cc=tomba@kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.