summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorChristos Gkekas <chris.gekas@gmail.com>2017-10-08 20:55:05 +0200
committerJacek Anaszewski <jacek.anaszewski@gmail.com>2017-10-09 20:39:54 +0200
commit94bf9e0cbb15c0d8db6c869f09f901b07f01c386 (patch)
treea24b6105a4541390c80d9a5ed33a1fa2835024fe /drivers
parentleds: ledtrig-heartbeat: Convert timers to use timer_setup() (diff)
downloadlinux-94bf9e0cbb15c0d8db6c869f09f901b07f01c386.tar.xz
linux-94bf9e0cbb15c0d8db6c869f09f901b07f01c386.zip
leds: tca6507: Remove unnecessary reg check
Variable reg is unsigned so checking whether it is less than zero is not necessary. Signed-off-by: Christos Gkekas <chris.gekas@gmail.com> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/leds/leds-tca6507.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/leds/leds-tca6507.c b/drivers/leds/leds-tca6507.c
index 45222a7f4f75..c12c16fb1b9c 100644
--- a/drivers/leds/leds-tca6507.c
+++ b/drivers/leds/leds-tca6507.c
@@ -715,7 +715,7 @@ tca6507_led_dt_init(struct i2c_client *client)
if (of_property_match_string(child, "compatible", "gpio") >= 0)
led.flags |= TCA6507_MAKE_GPIO;
ret = of_property_read_u32(child, "reg", &reg);
- if (ret != 0 || reg < 0 || reg >= NUM_LEDS)
+ if (ret != 0 || reg >= NUM_LEDS)
continue;
tca_leds[reg] = led;