lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1290883328.3700.1.camel@jlt3.sipsolutions.net>
Date:	Sat, 27 Nov 2010 19:42:08 +0100
From:	Johannes Berg <johannes@...solutions.net>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	Richard Purdie <rpurdie@...ux.intel.com>
Subject: [PATCH 2.6.37] led_class: fix typo in blink API

From: Johannes Berg <johannes.berg@...el.com>

When I added led_blink_set I had a typo: the
return value of the hw offload is a regular
error code that is zero when succesful, and
in that case software emulation should not
be used, rather than the other way around.

Signed-off-by: Johannes Berg <johannes.berg@...el.com>
---
It'd be nice to get this into 2.6.37 since the patch
that has the bug is in there. Sorry about that -- I
had tested the software implementation extensively but
apparently never tested the hw offload part.

 drivers/leds/led-class.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- wireless-testing.orig/drivers/leds/led-class.c	2010-11-27 19:32:24.000000000 +0100
+++ wireless-testing/drivers/leds/led-class.c	2010-11-27 19:35:41.000000000 +0100
@@ -267,7 +267,7 @@ void led_blink_set(struct led_classdev *
 		   unsigned long *delay_off)
 {
 	if (led_cdev->blink_set &&
-	    led_cdev->blink_set(led_cdev, delay_on, delay_off))
+	    !led_cdev->blink_set(led_cdev, delay_on, delay_off))
 		return;
 
 	/* blink with 1 Hz as default if nothing specified */


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ