Input: handle serio_register_driver() errors
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
diff --git a/drivers/input/joystick/warrior.c b/drivers/input/joystick/warrior.c
index 1e4828b..29d339a 100644
--- a/drivers/input/joystick/warrior.c
+++ b/drivers/input/joystick/warrior.c
@@ -224,8 +224,7 @@
static int __init warrior_init(void)
{
- serio_register_driver(&warrior_drv);
- return 0;
+ return serio_register_driver(&warrior_drv);
}
static void __exit warrior_exit(void)