diff options
author | Dmitry Torokhov <dtor@insightbb.com> | 2006-11-05 22:40:09 -0500 |
---|---|---|
committer | Dmitry Torokhov <dtor@insightbb.com> | 2006-11-05 22:40:09 -0500 |
commit | 127278ce2254c61f1346500374d61e33f74a8729 (patch) | |
tree | f7460f3f452d3dbe2d7a52dfa23a51dee0d312f3 /drivers/input/joystick/gf2k.c | |
parent | 52c1f5704d7555a16641429b2e7af5d26d7b119a (diff) | |
download | linux-127278ce2254c61f1346500374d61e33f74a8729.tar.gz linux-127278ce2254c61f1346500374d61e33f74a8729.tar.bz2 linux-127278ce2254c61f1346500374d61e33f74a8729.zip |
Input: joysticks - handle errors when registering input devices
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/joystick/gf2k.c')
-rw-r--r-- | drivers/input/joystick/gf2k.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/input/joystick/gf2k.c b/drivers/input/joystick/gf2k.c index e4a699f6ec87..bacbab5d1b6f 100644 --- a/drivers/input/joystick/gf2k.c +++ b/drivers/input/joystick/gf2k.c @@ -341,7 +341,9 @@ static int gf2k_connect(struct gameport *gameport, struct gameport_driver *drv) input_dev->absflat[gf2k_abs[i]] = (i < 2) ? 24 : 0; } - input_register_device(gf2k->dev); + err = input_register_device(gf2k->dev); + if (err) + goto fail2; return 0; |