aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/misc/ftdi-elan.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/misc/ftdi-elan.c')
-rw-r--r--drivers/usb/misc/ftdi-elan.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/drivers/usb/misc/ftdi-elan.c b/drivers/usb/misc/ftdi-elan.c
index bc3327e3dd7..d9cbdb87fac 100644
--- a/drivers/usb/misc/ftdi-elan.c
+++ b/drivers/usb/misc/ftdi-elan.c
@@ -2910,24 +2910,28 @@ static int __init ftdi_elan_init(void)
2910 INIT_LIST_HEAD(&ftdi_static_list); 2910 INIT_LIST_HEAD(&ftdi_static_list);
2911 status_queue = create_singlethread_workqueue("ftdi-status-control"); 2911 status_queue = create_singlethread_workqueue("ftdi-status-control");
2912 if (!status_queue) 2912 if (!status_queue)
2913 goto err1; 2913 goto err_status_queue;
2914 command_queue = create_singlethread_workqueue("ftdi-command-engine"); 2914 command_queue = create_singlethread_workqueue("ftdi-command-engine");
2915 if (!command_queue) 2915 if (!command_queue)
2916 goto err2; 2916 goto err_command_queue;
2917 respond_queue = create_singlethread_workqueue("ftdi-respond-engine"); 2917 respond_queue = create_singlethread_workqueue("ftdi-respond-engine");
2918 if (!respond_queue) 2918 if (!respond_queue)
2919 goto err3; 2919 goto err_respond_queue;
2920 result = usb_register(&ftdi_elan_driver); 2920 result = usb_register(&ftdi_elan_driver);
2921 if (result) 2921 if (result) {
2922 destroy_workqueue(status_queue);
2923 destroy_workqueue(command_queue);
2924 destroy_workqueue(respond_queue);
2922 printk(KERN_ERR "usb_register failed. Error number %d\n", 2925 printk(KERN_ERR "usb_register failed. Error number %d\n",
2923 result); 2926 result);
2927 }
2924 return result; 2928 return result;
2925 2929
2926 err3: 2930 err_respond_queue:
2927 destroy_workqueue(command_queue); 2931 destroy_workqueue(command_queue);
2928 err2: 2932 err_command_queue:
2929 destroy_workqueue(status_queue); 2933 destroy_workqueue(status_queue);
2930 err1: 2934 err_status_queue:
2931 printk(KERN_ERR "%s couldn't create workqueue\n", ftdi_elan_driver.name); 2935 printk(KERN_ERR "%s couldn't create workqueue\n", ftdi_elan_driver.name);
2932 return -ENOMEM; 2936 return -ENOMEM;
2933} 2937}