aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/joystick
diff options
context:
space:
mode:
authorAkinobu Mita <akinobu.mita@gmail.com>2006-11-23 23:35:10 -0500
committerDmitry Torokhov <dtor@insightbb.com>2006-11-23 23:35:10 -0500
commit153a9df01c0d1ecdc56161c7a0f830325145dd64 (patch)
tree6645b72a6036bb2491d1e54317009259e41bf568 /drivers/input/joystick
parented7b1f6d6ea1054ea4fe293a7fd8015fc3803d93 (diff)
Input: handle serio_register_driver() errors
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/joystick')
-rw-r--r--drivers/input/joystick/iforce/iforce-main.c14
-rw-r--r--drivers/input/joystick/magellan.c3
-rw-r--r--drivers/input/joystick/spaceball.c3
-rw-r--r--drivers/input/joystick/spaceorb.c3
-rw-r--r--drivers/input/joystick/stinger.c3
-rw-r--r--drivers/input/joystick/twidjoy.c3
-rw-r--r--drivers/input/joystick/warrior.c3
7 files changed, 17 insertions, 15 deletions
diff --git a/drivers/input/joystick/iforce/iforce-main.c b/drivers/input/joystick/iforce/iforce-main.c
index 706e0aea793c..3393a37fec39 100644
--- a/drivers/input/joystick/iforce/iforce-main.c
+++ b/drivers/input/joystick/iforce/iforce-main.c
@@ -467,13 +467,21 @@ int iforce_init_device(struct iforce *iforce)
467 467
468static int __init iforce_init(void) 468static int __init iforce_init(void)
469{ 469{
470 int err = 0;
471
470#ifdef CONFIG_JOYSTICK_IFORCE_USB 472#ifdef CONFIG_JOYSTICK_IFORCE_USB
471 usb_register(&iforce_usb_driver); 473 err = usb_register(&iforce_usb_driver);
474 if (err)
475 return err;
472#endif 476#endif
473#ifdef CONFIG_JOYSTICK_IFORCE_232 477#ifdef CONFIG_JOYSTICK_IFORCE_232
474 serio_register_driver(&iforce_serio_drv); 478 err = serio_register_driver(&iforce_serio_drv);
479#ifdef CONFIG_JOYSTICK_IFORCE_USB
480 if (err)
481 usb_deregister(&iforce_usb_driver);
475#endif 482#endif
476 return 0; 483#endif
484 return err;
477} 485}
478 486
479static void __exit iforce_exit(void) 487static void __exit iforce_exit(void)
diff --git a/drivers/input/joystick/magellan.c b/drivers/input/joystick/magellan.c
index d512b0a0282e..4112789f1196 100644
--- a/drivers/input/joystick/magellan.c
+++ b/drivers/input/joystick/magellan.c
@@ -231,8 +231,7 @@ static struct serio_driver magellan_drv = {
231 231
232static int __init magellan_init(void) 232static int __init magellan_init(void)
233{ 233{
234 serio_register_driver(&magellan_drv); 234 return serio_register_driver(&magellan_drv);
235 return 0;
236} 235}
237 236
238static void __exit magellan_exit(void) 237static void __exit magellan_exit(void)
diff --git a/drivers/input/joystick/spaceball.c b/drivers/input/joystick/spaceball.c
index 9b3597343c1c..08bf113e62eb 100644
--- a/drivers/input/joystick/spaceball.c
+++ b/drivers/input/joystick/spaceball.c
@@ -300,8 +300,7 @@ static struct serio_driver spaceball_drv = {
300 300
301static int __init spaceball_init(void) 301static int __init spaceball_init(void)
302{ 302{
303 serio_register_driver(&spaceball_drv); 303 return serio_register_driver(&spaceball_drv);
304 return 0;
305} 304}
306 305
307static void __exit spaceball_exit(void) 306static void __exit spaceball_exit(void)
diff --git a/drivers/input/joystick/spaceorb.c b/drivers/input/joystick/spaceorb.c
index ea9d51e70a12..c9c79211af71 100644
--- a/drivers/input/joystick/spaceorb.c
+++ b/drivers/input/joystick/spaceorb.c
@@ -246,8 +246,7 @@ static struct serio_driver spaceorb_drv = {
246 246
247static int __init spaceorb_init(void) 247static int __init spaceorb_init(void)
248{ 248{
249 serio_register_driver(&spaceorb_drv); 249 return serio_register_driver(&spaceorb_drv);
250 return 0;
251} 250}
252 251
253static void __exit spaceorb_exit(void) 252static void __exit spaceorb_exit(void)
diff --git a/drivers/input/joystick/stinger.c b/drivers/input/joystick/stinger.c
index b51a4a4c7f60..ecb0916215fa 100644
--- a/drivers/input/joystick/stinger.c
+++ b/drivers/input/joystick/stinger.c
@@ -216,8 +216,7 @@ static struct serio_driver stinger_drv = {
216 216
217static int __init stinger_init(void) 217static int __init stinger_init(void)
218{ 218{
219 serio_register_driver(&stinger_drv); 219 return serio_register_driver(&stinger_drv);
220 return 0;
221} 220}
222 221
223static void __exit stinger_exit(void) 222static void __exit stinger_exit(void)
diff --git a/drivers/input/joystick/twidjoy.c b/drivers/input/joystick/twidjoy.c
index 3c1c83e8609a..9cf17d6ced82 100644
--- a/drivers/input/joystick/twidjoy.c
+++ b/drivers/input/joystick/twidjoy.c
@@ -269,8 +269,7 @@ static struct serio_driver twidjoy_drv = {
269 269
270static int __init twidjoy_init(void) 270static int __init twidjoy_init(void)
271{ 271{
272 serio_register_driver(&twidjoy_drv); 272 return serio_register_driver(&twidjoy_drv);
273 return 0;
274} 273}
275 274
276static void __exit twidjoy_exit(void) 275static void __exit twidjoy_exit(void)
diff --git a/drivers/input/joystick/warrior.c b/drivers/input/joystick/warrior.c
index 1e4828b9a1ab..29d339acf430 100644
--- a/drivers/input/joystick/warrior.c
+++ b/drivers/input/joystick/warrior.c
@@ -224,8 +224,7 @@ static struct serio_driver warrior_drv = {
224 224
225static int __init warrior_init(void) 225static int __init warrior_init(void)
226{ 226{
227 serio_register_driver(&warrior_drv); 227 return serio_register_driver(&warrior_drv);
228 return 0;
229} 228}
230 229
231static void __exit warrior_exit(void) 230static void __exit warrior_exit(void)