aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Ian King <[email protected]>2019-06-03 15:21:02 +0100
committerAndrzej Hajda <[email protected]>2019-06-07 15:01:19 +0200
commit382d8dfe8b1b4eb3b3f9f830ef52b58780290d32 (patch)
tree5a5a052cb9dd2c621dd9e35f52bb4ca2e839f44d
parent955f03a7d0738bd373d69f76191b9a66adb3255c (diff)
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 <[email protected]> Acked-by: Jyri Sarha <[email protected]> Reviewed-by: Andrzej Hajda <[email protected]> Signed-off-by: Andrzej Hajda <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
-rw-r--r--drivers/gpu/drm/bridge/sii902x.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/bridge/sii902x.c b/drivers/gpu/drm/bridge/sii902x.c
index dea784b39abc..84bc2e833de8 100644
--- a/drivers/gpu/drm/bridge/sii902x.c
+++ b/drivers/gpu/drm/bridge/sii902x.c
@@ -729,7 +729,7 @@ static int sii902x_audio_codec_init(struct sii902x *sii902x,
.max_i2s_channels = 0,
};
u8 lanes[4];
- u32 num_lanes, i;
+ int num_lanes, i;
if (!of_property_read_bool(dev->of_node, "#sound-dai-cells")) {
dev_dbg(dev, "%s: No \"#sound-dai-cells\", no audio\n",