mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-25 21:24:08 +08:00
drm/omap: dsi: fix unsigned expression compared with zero
r is "u32" always >= 0,mipi_dsi_create_packet may return little than zero. so r < 0 condition is never accessible. Fixes coccicheck warnings: ./drivers/gpu/drm/omapdrm/dss/dsi.c:2155:5-6: WARNING: Unsigned expression compared with zero: r < 0 Signed-off-by: Junlin Yang <yangjunlin@yulong.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Link: https://patchwork.freedesktop.org/patch/msgid/20210312071445.1721-1-angkery@163.com
This commit is contained in:
parent
6c5403173a
commit
6909115442
@ -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 ret;
|
||||
u32 r;
|
||||
|
||||
r = mipi_dsi_create_packet(&pkt, msg);
|
||||
if (r < 0)
|
||||
return r;
|
||||
ret = mipi_dsi_create_packet(&pkt, msg);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
WARN_ON(!dsi_bus_is_locked(dsi));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user