Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: ff5781634c41 ("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

authored by

Colin Ian King and committed by
Andrzej Hajda
382d8dfe 955f03a7

+1 -1
+1 -1
drivers/gpu/drm/bridge/sii902x.c
··· 729 729 .max_i2s_channels = 0, 730 730 }; 731 731 u8 lanes[4]; 732 - u32 num_lanes, i; 732 + int num_lanes, i; 733 733 734 734 if (!of_property_read_bool(dev->of_node, "#sound-dai-cells")) { 735 735 dev_dbg(dev, "%s: No \"#sound-dai-cells\", no audio\n",