From abc196359bf91a53392d8fac272a4ea8a9ecc0c4 Mon Sep 17 00:00:00 2001 From: Jacek Anaszewski Date: Wed, 18 Nov 2015 16:32:37 +0100 Subject: [PATCH] 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 --- drivers/leds/led-class-flash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.20.1