diff options
author | Akinobu Mita <akinobu.mita@gmail.com> | 2006-11-23 23:35:10 -0500 |
---|---|---|
committer | Dmitry Torokhov <dtor@insightbb.com> | 2006-11-23 23:35:10 -0500 |
commit | 153a9df01c0d1ecdc56161c7a0f830325145dd64 (patch) | |
tree | 6645b72a6036bb2491d1e54317009259e41bf568 /drivers/input/mouse/psmouse-base.c | |
parent | ed7b1f6d6ea1054ea4fe293a7fd8015fc3803d93 (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/mouse/psmouse-base.c')
-rw-r--r-- | drivers/input/mouse/psmouse-base.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c index 58beca99a9c..e626b1e737f 100644 --- a/drivers/input/mouse/psmouse-base.c +++ b/drivers/input/mouse/psmouse-base.c @@ -1524,15 +1524,19 @@ static int psmouse_get_maxproto(char *buffer, struct kernel_param *kp) static int __init psmouse_init(void) { + int err; + kpsmoused_wq = create_singlethread_workqueue("kpsmoused"); if (!kpsmoused_wq) { printk(KERN_ERR "psmouse: failed to create kpsmoused workqueue\n"); return -ENOMEM; } - serio_register_driver(&psmouse_drv); + err = serio_register_driver(&psmouse_drv); + if (err) + destroy_workqueue(kpsmoused_wq); - return 0; + return err; } static void __exit psmouse_exit(void) |