linux-leds.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] led: flash: Remove checking for state < 1 in flash_strobe_store()
@ 2015-11-18 15:33 Jacek Anaszewski
  0 siblings, 0 replies; only message in thread
From: Jacek Anaszewski @ 2015-11-18 15:33 UTC (permalink / raw)
  To: linux-leds; +Cc: dcb314, Jacek Anaszewski

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 |    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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-11-18 15:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-18 15:33 [PATCH] led: flash: Remove checking for state < 1 in flash_strobe_store() Jacek Anaszewski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).