diff options
author | Jiapeng Chong <[email protected]> | 2023-02-06 15:55:18 +0800 |
---|---|---|
committer | Mark Brown <[email protected]> | 2023-02-06 13:12:36 +0000 |
commit | 05f5504b161054bdce74eef5d9ff602bbebaeca8 (patch) | |
tree | 21d61e9680c0d464c11f4c88482aedadbb161017 | |
parent | 983272a2a223de59dbb4cb189aa4d02d7156d209 (diff) |
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 <[email protected]>
Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3947
Signed-off-by: Jiapeng Chong <[email protected]>
Acked-by: Herve Codina <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mark Brown <[email protected]>
-rw-r--r-- | sound/soc/codecs/idt821034.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/sound/soc/codecs/idt821034.c b/sound/soc/codecs/idt821034.c index 5d01787b1c1f..2cc7b9166e69 100644 --- a/sound/soc/codecs/idt821034.c +++ b/sound/soc/codecs/idt821034.c @@ -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; |