ASoC: codecs: Fix unsigned comparison with less than zero
Subsystems (3)
PATCH 1/1 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.
--- sound/soc/codecs/idt821034.c | 2 -- 1 file changed, 2 deletions(-)
sound/soc/codecs/idt821034.c +0 -2
@@ -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 ;
Signature · 1 line
2.20.1.7.g153144c
Quoted 17 lines · On Mon, 6 Feb 2023 15:55:18 +0800 Jiapeng Chong…
The val is defined as unsigned int type, if(val<0) is redundant, so delete it.
sound/soc/codecs/idt821034.c:449idt821034_kctrl_gain_put()warn: unsigned 'val' is never less than zero.Reported-by Abaci Robot <[email protected]>Signed-off-by Jiapeng Chong <[email protected]>--- sound/soc/codecs/idt821034.c | 2 -- 1 file changed, 2 deletions(-)sound/soc/codecs/idt821034.c +0
-0
sound/soc/codecs/idt821034.c static int idt821034_kctrl_gain_put(struct snd_kcontrol *kcontrol, · line 451
Quoted 8 lines
sound/soc/codecs/idt821034.c +0
-2@@ -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 ;
Thanks,
Hervé
Signature · 3 lines
Hervé Codina, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
Mark Brown
maintainerQuoted 6 lines · Jiapeng Chong
The val is defined as unsigned int type, if(val<0) is redundant, so delete it.
sound/soc/codecs/idt821034.c:449idt821034_kctrl_gain_put()warn: unsigned 'val' is never less than zero.
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: codecs: Fix unsigned comparison with less than zero
commit: 05f5504b161054bdce74eef5d9ff602bbebaeca8
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark