trivial: Fix dubious bitwise 'and' usage spotted by sparse.

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Friday, April 3, 2009 - 6:02 pm

Gitweb:     http://git.kernel.org/linus/542d886b7f326182cd0a484714d0117e3a8cf11b
Commit:     542d886b7f326182cd0a484714d0117e3a8cf11b
Parent:     24ec68fb8f0a36a9063f3e72039316e718b628ed
Author:     Alexey Zaytsev <alexey.zaytsev@gmail.com>
AuthorDate: Sat Jan 10 02:48:28 2009 +0300
Committer:  Jiri Kosina <jkosina@suse.cz>
CommitDate: Mon Mar 30 15:21:57 2009 +0200

    trivial: Fix dubious bitwise 'and' usage spotted by sparse.
    
    It doesn't change the semantics, but clearly
    the logical 'and' was meant to be used here.
    
    Signed-off-by: Alexey Zaytsev <alexey.zaytsev@gmail.com>
    Signed-off-by: Jiri Kosina <jkosina@suse.cz>
---
 drivers/usb/wusbcore/security.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/wusbcore/security.c b/drivers/usb/wusbcore/security.c
index 8118db7..b2f149f 100644
--- a/drivers/usb/wusbcore/security.c
+++ b/drivers/usb/wusbcore/security.c
@@ -562,7 +562,7 @@ void wusbhc_gtk_rekey(struct wusbhc *wusbhc)
 		struct wusb_dev *wusb_dev;
 
 		wusb_dev = wusbhc->port[p].wusb_dev;
-		if (!wusb_dev || !wusb_dev->usb_dev | !wusb_dev->usb_dev->authenticated)
+		if (!wusb_dev || !wusb_dev->usb_dev || !wusb_dev->usb_dev->authenticated)
 			continue;
 
 		usb_fill_control_urb(wusb_dev->set_gtk_urb, wusb_dev->usb_dev,
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
trivial: Fix dubious bitwise 'and' usage spotted by sparse., Linux Kernel Mailing ..., (Fri Apr 3, 6:02 pm)