]> git.baikalelectronics.ru Git - kernel.git/commit
drm/bridge: sii902x: fix comparision of u32 with less than zero
authorColin Ian King <colin.king@canonical.com>
Mon, 3 Jun 2019 14:21:02 +0000 (15:21 +0100)
committerAndrzej Hajda <a.hajda@samsung.com>
Fri, 7 Jun 2019 13:01:19 +0000 (15:01 +0200)
commitd0c5e0f2de931b6a94dd8091c45e33e515f86237
tree5a5a052cb9dd2c621dd9e35f52bb4ca2e839f44d
parent07b1b5d7cf11ff61dc9fb39390b8e83de141d0b2
drm/bridge: sii902x: fix comparision of u32 with less than zero

The less than check for the variable num_lanes is always going to be
false because the variable is a u32.  Fix this by making num_lanes an
int and also make loop index i an int too.

Addresses-Coverity: ("Unsigned compared against 0")
Fixes: 5a61aaf5687a ("drm/bridge: sii902x: Implement HDMI audio support")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Jyri Sarha <jsarha@ti.com>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190603142102.27191-1-colin.king@canonical.com
drivers/gpu/drm/bridge/sii902x.c