summaryrefslogtreecommitdiffstats
path: root/drivers/input/joystick/grip.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dtor_core@ameritech.net>2006-01-29 21:51:16 -0500
committerDmitry Torokhov <dtor_core@ameritech.net>2006-01-29 21:51:16 -0500
commit3575c3410071dc778d2d9c6002493a5dce73ec0b (patch)
tree69c01a4615018ef820df06001751e16ad591d50e /drivers/input/joystick/grip.c
parentffc6b529e8c46c73827008c7406f43482d71beed (diff)
downloadlinux-3575c3410071dc778d2d9c6002493a5dce73ec0b.tar.bz2
Input: grip - fix crash when accessing device
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/joystick/grip.c')
-rw-r--r--drivers/input/joystick/grip.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/input/joystick/grip.c b/drivers/input/joystick/grip.c
index a936e7aedb10..330c6717c149 100644
--- a/drivers/input/joystick/grip.c
+++ b/drivers/input/joystick/grip.c
@@ -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]) {