提交 192b775c 编写于 作者: M Maxime Austruy 提交者: John W. Linville

[PATCH] zd1211rw: fix potential leak in usb_init

usb_init should call destroy_workqueue when usb_register fails.
Signed-off-by: NMaxime Austruy <maxime@tralhalla.org>
Signed-off-by: NUlrich Kunitz <kune@deine-taler.de>
Signed-off-by: NDaniel Drake <dsd@gentoo.org>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 62d0cfcb
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册