diff options
| author | Dmitry Torokhov <dtor_core@ameritech.net> | 2006-02-02 00:09:00 -0500 |
|---|---|---|
| committer | Chris Wright <chrisw@sous-sol.org> | 2006-02-09 23:20:08 -0800 |
| commit | 1e55dc39e9c63e33b8458870dccc925d2a300f9a (patch) | |
| tree | 5bac810663efb41e9fcbb5d0210008722ffcf1c9 /drivers/input | |
| parent | cacb5bd9e9c404b2e33f1d75f18604df34e16fad (diff) | |
[PATCH] Input: grip - fix crash when accessing device
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/input')
| -rw-r--r-- | drivers/input/joystick/grip.c | 3 |
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]) { |
