[PATCH] led: flash: Remove checking for state < 1 in flash_strobe_store()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Strobe state variable is declared as unsigned long, remove
the check for values less than zero then.

Signed-off-by: Jacek Anaszewski <j.anaszewski@xxxxxxxxxxx>
Reported-by: David Binderman <dcb314@xxxxxxxxxxx>
---
 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 f53783b..cf39827 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;
 	}
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-leds" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux