mirror of https://gitee.com/openkylin/linux.git
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: 1ed6253856
("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>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210127015117.23267-1-dong.menglong@zte.com.cn
This commit is contained in:
parent
97ecfff41e
commit
bbd13d6a7b
|
@ -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));
|
||||
|
||||
|
|
Loading…
Reference in New Issue