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 58beca99a9c3..e626b1e737fa 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) | |||
1524 | 1524 | ||
1525 | static int __init psmouse_init(void) | 1525 | static int __init psmouse_init(void) |
1526 | { | 1526 | { |
1527 | int err; | ||
1528 | |||
1527 | kpsmoused_wq = create_singlethread_workqueue("kpsmoused"); | 1529 | kpsmoused_wq = create_singlethread_workqueue("kpsmoused"); |
1528 | if (!kpsmoused_wq) { | 1530 | if (!kpsmoused_wq) { |
1529 | printk(KERN_ERR "psmouse: failed to create kpsmoused workqueue\n"); | 1531 | printk(KERN_ERR "psmouse: failed to create kpsmoused workqueue\n"); |
1530 | return -ENOMEM; | 1532 | return -ENOMEM; |
1531 | } | 1533 | } |
1532 | 1534 | ||
1533 | serio_register_driver(&psmouse_drv); | 1535 | err = serio_register_driver(&psmouse_drv); |
1536 | if (err) | ||
1537 | destroy_workqueue(kpsmoused_wq); | ||
1534 | 1538 | ||
1535 | return 0; | 1539 | return err; |
1536 | } | 1540 | } |
1537 | 1541 | ||
1538 | static void __exit psmouse_exit(void) | 1542 | static void __exit psmouse_exit(void) |