From: Dmitry Torokhov Date: Mon, 30 Jan 2006 02:51:16 +0000 (-0500) Subject: Input: grip - fix crash when accessing device X-Git-Tag: v2.6.16-rc2~171^2~12 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3575c3410071dc778d2d9c6002493a5dce73ec0b;p=linux-2.6 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 a936e7aedb..330c6717c1 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]) {