Input: gf2k - fix &&/|| confusion in gf2k_connect()
authorRoel Kluin <roel.kluin@gmail.com>
Sat, 2 Jan 2010 02:35:11 +0000 (18:35 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Sat, 2 Jan 2010 02:45:52 +0000 (18:45 -0800)
This always evaluates to true.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
drivers/input/joystick/gf2k.c

index 67c207f..45ac70e 100644 (file)
@@ -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;