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.

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: Abaci Robot <abaci@linux.alibaba.com>
Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3947
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Acked-by: Herve Codina <herve.codina@bootlin.com>
Link: https://lore.kernel.org/r/20230206075518.84169-1-jiapeng.chong@linux.alibaba.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Jiapeng Chong and committed by
Mark Brown
05f5504b 983272a2

-2
-2
sound/soc/codecs/idt821034.c
··· 446 446 u8 ch; 447 447 448 448 val = ucontrol->value.integer.value[0]; 449 - if (val < 0) 450 - return -EINVAL; 451 449 if (val > max - min) 452 450 return -EINVAL; 453 451