]> err.no Git - linux-2.6/commitdiff
Input: grip - fix crash when accessing device
authorDmitry Torokhov <dtor_core@ameritech.net>
Mon, 30 Jan 2006 02:51:16 +0000 (21:51 -0500)
committerDmitry Torokhov <dtor_core@ameritech.net>
Mon, 30 Jan 2006 02:51:16 +0000 (21:51 -0500)
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
drivers/input/joystick/grip.c

index a936e7aedb103552e617010d7260a74664c6ff29..330c6717c149724ada1bb407006c87cdb3e38b7b 100644 (file)
@@ -192,6 +192,9 @@ static void grip_poll(struct gameport *gameport)
        for (i = 0; i < 2; i++) {
 
                dev = grip->dev[i];
+               if (!dev)
+                       continue;
+
                grip->reads++;
 
                switch (grip->mode[i]) {