提交 382d8dfe 编写于 作者: C Colin Ian King 提交者: Andrzej Hajda

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: ff578163 ("drm/bridge: sii902x: Implement HDMI audio support")
Signed-off-by: NColin Ian King <colin.king@canonical.com>
Acked-by: NJyri Sarha <jsarha@ti.com>
Reviewed-by: NAndrzej Hajda <a.hajda@samsung.com>
Signed-off-by: NAndrzej Hajda <a.hajda@samsung.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190603142102.27191-1-colin.king@canonical.com
上级 955f03a7
......@@ -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",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册