Commit 192b775c authored by Maxime Austruy's avatar Maxime Austruy Committed by John W. Linville

[PATCH] zd1211rw: fix potential leak in usb_init

usb_init should call destroy_workqueue when usb_register fails.
Signed-off-by: default avatarMaxime Austruy <maxime@tralhalla.org>
Signed-off-by: default avatarUlrich Kunitz <kune@deine-taler.de>
Signed-off-by: default avatarDaniel Drake <dsd@gentoo.org>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 62d0cfcb
...@@ -1128,6 +1128,7 @@ static int __init usb_init(void) ...@@ -1128,6 +1128,7 @@ static int __init usb_init(void)
r = usb_register(&driver); r = usb_register(&driver);
if (r) { if (r) {
destroy_workqueue(zd_workqueue);
printk(KERN_ERR "%s usb_register() failed. Error number %d\n", printk(KERN_ERR "%s usb_register() failed. Error number %d\n",
driver.name, r); driver.name, r);
return r; return r;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment