projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
23fa0b0
)
ASoC: tlv320adc3xxx: Fix unsigned int compared against 0
author
Advait Dhamorikar
<advaitdhamorikar@gmail.com>
Fri, 4 Oct 2024 14:10:46 +0000
(19:40 +0530)
committer
Mark Brown
<broonie@kernel.org>
Sat, 5 Oct 2024 01:53:58 +0000
(
02:53
+0100)
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>
sound/soc/codecs/tlv320adc3xxx.c
patch
|
blob
|
history
diff --git
a/sound/soc/codecs/tlv320adc3xxx.c
b/sound/soc/codecs/tlv320adc3xxx.c
index
7073b9d
..
868e8a9
100644
(file)
--- a/
sound/soc/codecs/tlv320adc3xxx.c
+++ b/
sound/soc/codecs/tlv320adc3xxx.c
@@
-961,7
+961,7
@@
static int adc3xxx_gpio_request(struct gpio_chip *chip, unsigned int offset)
if (offset >= ADC3XXX_GPIOS_MAX)
return -EINVAL;
- if (offset
>= 0 && offset
< ADC3XXX_GPIO_PINS) {
+ if (offset < ADC3XXX_GPIO_PINS) {
/* GPIO1 is offset 0, GPIO2 is offset 1 */
/* We check here that the GPIO pins are either not configured
* in the DT, or that they purposely are set as outputs.