Commit bbd13d6a authored by Menglong Dong's avatar Menglong Dong Committed by Tomi Valkeinen
Browse files

drm/omap: dsi: fix unreachable code in dsi_vc_send_short()



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: 1ed62538 ("drm/omap: dsi: switch dsi_vc_send_long/short to mipi_dsi_msg")

Signed-off-by: default avatarMenglong Dong <dong.menglong@zte.com.cn>
Reviewed-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210127015117.23267-1-dong.menglong@zte.com.cn
parent 97ecfff4
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -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));