Commit 4a6806cf authored by Yang Yingliang's avatar Yang Yingliang Committed by Jakub Kicinski

net: marvell: prestera: add missing destroy_workqueue() in prestera_module_init()

Add the missing destroy_workqueue() before return from
prestera_module_init() in the error handling case.

Fixes: 4394fbcb ("net: marvell: prestera: handle fib notifications")
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20220322090236.1439649-1-yangyingliang@huawei.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent e9e6faea
......@@ -1032,8 +1032,10 @@ static int __init prestera_module_init(void)
return -ENOMEM;
prestera_owq = alloc_ordered_workqueue("prestera_ordered", 0);
if (!prestera_owq)
if (!prestera_owq) {
destroy_workqueue(prestera_wq);
return -ENOMEM;
}
return 0;
}
......
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