From: Dmitry Torokhov Date: Mon, 30 Jan 2006 02:51:16 +0000 (-0500) Subject: Input: grip - fix crash when accessing device X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=3575c3410071dc778d2d9c6002493a5dce73ec0b;p=linux-beck.git Input: grip - fix crash when accessing device Signed-off-by: Dmitry Torokhov --- 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]) {