Commit 1e55dc39 authored by Dmitry Torokhov's avatar Dmitry Torokhov Committed by Chris Wright

[PATCH] Input: grip - fix crash when accessing device

Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
Signed-off-by: default avatarChris Wright <chrisw@sous-sol.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent cacb5bd9
...@@ -192,6 +192,9 @@ static void grip_poll(struct gameport *gameport) ...@@ -192,6 +192,9 @@ static void grip_poll(struct gameport *gameport)
for (i = 0; i < 2; i++) { for (i = 0; i < 2; i++) {
dev = grip->dev[i]; dev = grip->dev[i];
if (!dev)
continue;
grip->reads++; grip->reads++;
switch (grip->mode[i]) { switch (grip->mode[i]) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment