[PATCH] zd1211rw: fix potential leak in usb_init

usb_init should call destroy_workqueue when usb_register fails.

Signed-off-by: Maxime Austruy <maxime@tralhalla.org>
Signed-off-by: Ulrich Kunitz <kune@deine-taler.de>
Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
Maxime Austruy 2007-01-29 00:59:51 +00:00 committed by John W. Linville
parent 62d0cfcb27
commit 192b775cc8

View File

@ -1128,6 +1128,7 @@ static int __init usb_init(void)
r = usb_register(&driver);
if (r) {
destroy_workqueue(zd_workqueue);
printk(KERN_ERR "%s usb_register() failed. Error number %d\n",
driver.name, r);
return r;