Input: &&/|| confusion in gf2k_connect()?
Subsystems (2)
PATCH 1/1 Input: &&/|| confusion in gf2k_connect()?
This always evaluates to true.
Signed-off-by Roel Kluin <[email protected]>
--- 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
@@ -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;
Quoted 3 lines · Roel Kluin
This always evaluates to true.
Signed-off-by Roel Kluin <[email protected]>
Applied to 'for-linus', thank you Roel.
Signature · 1 line
Dmitry