summaryrefslogtreecommitdiff
path: root/drivers/input/joystick/guillemot.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dtor@insightbb.com>2006-11-06 06:40:09 +0300
committerDmitry Torokhov <dtor@insightbb.com>2006-11-06 06:40:09 +0300
commit127278ce2254c61f1346500374d61e33f74a8729 (patch)
treef7460f3f452d3dbe2d7a52dfa23a51dee0d312f3 /drivers/input/joystick/guillemot.c
parent52c1f5704d7555a16641429b2e7af5d26d7b119a (diff)
downloadlinux-127278ce2254c61f1346500374d61e33f74a8729.tar.xz
Input: joysticks - handle errors when registering input devices
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/joystick/guillemot.c')
-rw-r--r--drivers/input/joystick/guillemot.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/input/joystick/guillemot.c b/drivers/input/joystick/guillemot.c
index 840ed9b512b2..dbc5d92858b8 100644
--- a/drivers/input/joystick/guillemot.c
+++ b/drivers/input/joystick/guillemot.c
@@ -250,7 +250,9 @@ static int guillemot_connect(struct gameport *gameport, struct gameport_driver *
for (i = 0; (t = guillemot->type->btn[i]) >= 0; i++)
set_bit(t, input_dev->keybit);
- input_register_device(guillemot->dev);
+ err = input_register_device(guillemot->dev);
+ if (err)
+ goto fail2;
return 0;