leds: flash: Remove checking for state < 1 in flash_strobe_store()
authorJacek Anaszewski <j.anaszewski@samsung.com>
Wed, 18 Nov 2015 15:32:37 +0000 (16:32 +0100)
committerJacek Anaszewski <j.anaszewski@samsung.com>
Mon, 4 Jan 2016 08:57:37 +0000 (09:57 +0100)
Strobe state variable is declared as unsigned long, remove
the check for values less than zero then.

Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Reported-by: David Binderman <dcb314@hotmail.com>
drivers/leds/led-class-flash.c

index f53783b8d5e8bc0914d5fd2971be52c1526f3f0e..cf398275a53cbc48ecbf3f49ec9017b26da27dbf 100644 (file)
@@ -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;
        }