summaryrefslogtreecommitdiffstats
path: root/drivers/input/joystick/gf2k.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/joystick/gf2k.c')
-rw-r--r--drivers/input/joystick/gf2k.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/input/joystick/gf2k.c b/drivers/input/joystick/gf2k.c
index e4a699f6ec8..bacbab5d1b6 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;