From: Jacek Anaszewski Date: Wed, 18 Nov 2015 15:32:37 +0000 (+0100) Subject: leds: flash: Remove checking for state < 1 in flash_strobe_store() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=abc196359bf91a53392d8fac272a4ea8a9ecc0c4;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git leds: flash: Remove checking for state < 1 in flash_strobe_store() Strobe state variable is declared as unsigned long, remove the check for values less than zero then. Signed-off-by: Jacek Anaszewski Reported-by: David Binderman --- diff --git a/drivers/leds/led-class-flash.c b/drivers/leds/led-class-flash.c index f53783b8d5e8..cf398275a53c 100644 --- a/drivers/leds/led-class-flash.c +++ b/drivers/leds/led-class-flash.c @@ -108,7 +108,7 @@ static ssize_t flash_strobe_store(struct device *dev, if (ret) goto unlock; - if (state < 0 || state > 1) { + if (state > 1) { ret = -EINVAL; goto unlock; }