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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <498C86A1.8030404@gmail.com>
Date:	Fri, 06 Feb 2009 19:51:13 +0100
From:	Roel Kluin <roel.kluin@...il.com>
To:	Roland Dreier <rdreier@...co.com>
CC:	riku.voipio@....fi, rpurdie@...ys.net,
	lkml <linux-kernel@...r.kernel.org>
Subject: [PATCH v2] leds: Fix &&/|| confusion

Roland Dreier wrote:
>  > -	if (type != EV_SND && (code != SND_BELL || code != SND_TONE))
>  > +	if (type != EV_SND && (code != SND_BELL && code != SND_TONE))
> 
> Actually more likely seems to be
> 
> 	if (type != EV_SND || (code != SND_BELL && code != SND_TONE))

Thanks for your review,

----------------------->8--------------8<-------------------------------
Fix &&/|| confusion

Signed-off-by: Roel Kluin <roel.kluin@...il.com>
---
diff --git a/drivers/leds/leds-pca9532.c b/drivers/leds/leds-pca9532.c
index 76ec749..11d3f1e 100644
--- a/drivers/leds/leds-pca9532.c
+++ b/drivers/leds/leds-pca9532.c
@@ -169,7 +169,7 @@ static int pca9532_event(struct input_dev *dev, unsigned int type,
 {
 	struct pca9532_data *data = input_get_drvdata(dev);
 
-	if (type != EV_SND && (code != SND_BELL || code != SND_TONE))
+	if (type != EV_SND || (code != SND_BELL && code != SND_TONE))
 		return -1;
 
 	/* XXX: allow different kind of beeps with psc/pwm modifications */
--
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