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: tlv320adc3xxx: Fix unsigned int compared against 0

An unsigned value held by offset can never be
negative, so this test will always evaluate
the same way and is therefore redundant.

Signed-off-by: Advait Dhamorikar <advaitdhamorikar@gmail.com>
Link: https://patch.msgid.link/20241004141046.61265-1-advaitdhamorikar@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Advait Dhamorikar and committed by
Mark Brown
40ba40fa 23fa0b04

+1 -1
+1 -1
sound/soc/codecs/tlv320adc3xxx.c
··· 961 961 if (offset >= ADC3XXX_GPIOS_MAX) 962 962 return -EINVAL; 963 963 964 - if (offset >= 0 && offset < ADC3XXX_GPIO_PINS) { 964 + if (offset < ADC3XXX_GPIO_PINS) { 965 965 /* GPIO1 is offset 0, GPIO2 is offset 1 */ 966 966 /* We check here that the GPIO pins are either not configured 967 967 * in the DT, or that they purposely are set as outputs.