aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/joystick/amijoy.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/joystick/amijoy.c')
-rw-r--r--drivers/input/joystick/amijoy.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/input/joystick/amijoy.c b/drivers/input/joystick/amijoy.c
index 650acf3a30b7..e608691b5a61 100644
--- a/drivers/input/joystick/amijoy.c
+++ b/drivers/input/joystick/amijoy.c
@@ -147,7 +147,11 @@ static int __init amijoy_init(void)
147 amijoy_dev[i]->absmax[ABS_X + j] = 1; 147 amijoy_dev[i]->absmax[ABS_X + j] = 1;
148 } 148 }
149 149
150 input_register_device(amijoy_dev[i]); 150 err = input_register_device(amijoy_dev[i]);
151 if (err) {
152 input_free_device(amijoy_dev[i]);
153 goto fail;
154 }
151 } 155 }
152 return 0; 156 return 0;
153 157