Commit 05f5504b authored by Jiapeng Chong's avatar Jiapeng Chong Committed by Mark Brown

ASoC: codecs: Fix unsigned comparison with less than zero

The val is defined as unsigned int type, if(val<0) is redundant, so
delete it.

sound/soc/codecs/idt821034.c:449 idt821034_kctrl_gain_put() warn: unsigned 'val' is never less than zero.
Reported-by: default avatarAbaci Robot <abaci@linux.alibaba.com>
Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3947Signed-off-by: default avatarJiapeng Chong <jiapeng.chong@linux.alibaba.com>
Acked-by: default avatarHerve Codina <herve.codina@bootlin.com>
Link: https://lore.kernel.org/r/20230206075518.84169-1-jiapeng.chong@linux.alibaba.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 983272a2
......@@ -446,8 +446,6 @@ static int idt821034_kctrl_gain_put(struct snd_kcontrol *kcontrol,
u8 ch;
val = ucontrol->value.integer.value[0];
if (val < 0)
return -EINVAL;
if (val > max - min)
return -EINVAL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment