mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-15 17:51:41 -04:00
[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:
committed by
John W. Linville
parent
62d0cfcb27
commit
192b775cc8
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user