Skip to contentSkip to conversation

Input: &&/|| confusion in gf2k_connect()?

PATCH Applied Roel Kluin 2 participants 2 messages Dec 31, 2009 – Jan 2, 2010

Subsystems (2)
lore
Share & tools
lore

Roel Kluin

author
#0 lore raw

PATCH 1/1 Input: &&/|| confusion in gf2k_connect()?

This always evaluates to true.

---
 drivers/input/joystick/gf2k.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

I am not 100% certain, but wasn't this intended?

drivers/input/joystick/gf2k.c +1 -1
index 67c207f..45ac70e 100644
@@ -277,7 +277,7 @@ static int gf2k_connect(struct gameport *gameport, struct gameport_driver *drv)
 	}
 
 #ifdef RESET_WORKS
-	if ((gf2k->id != (GB(19,2,0) | GB(15,3,2) | GB(12,3,5))) ||
+	if ((gf2k->id != (GB(19,2,0) | GB(15,3,2) | GB(12,3,5))) &&
 	    (gf2k->id != (GB(31,2,0) | GB(27,3,2) | GB(24,3,5)))) {
 		err = -ENODEV;
 		goto fail2;