From 3575c3410071dc778d2d9c6002493a5dce73ec0b Mon Sep 17 00:00:00 2001 From: Dmitry Torokhov Date: Sun, 29 Jan 2006 21:51:16 -0500 Subject: Input: grip - fix crash when accessing device Signed-off-by: Dmitry Torokhov --- drivers/input/joystick/grip.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers/input/joystick') 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]) { -- cgit v1.2.3