summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYang Yingliang <yangyingliang@huawei.com>2022-03-22 17:02:36 +0800
committerJakub Kicinski <kuba@kernel.org>2022-03-23 10:32:39 -0700
commit4a6806cfcbca2cd7bae94b2d4244dab3aaa1b333 (patch)
tree42bf6557d34ed4fa21c89960ac83a80919a103e4
parente9e6faeafaa00da1851bcf47912b0f1acae666b4 (diff)
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: 4394fbcb78cf ("net: marvell: prestera: handle fib notifications") Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20220322090236.1439649-1-yangyingliang@huawei.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-rw-r--r--drivers/net/ethernet/marvell/prestera/prestera_main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ethernet/marvell/prestera/prestera_main.c b/drivers/net/ethernet/marvell/prestera/prestera_main.c
index 1402c7889e78..3952fdcc9240 100644
--- a/drivers/net/ethernet/marvell/prestera/prestera_main.c
+++ b/drivers/net/ethernet/marvell/prestera/prestera_main.c
@@ -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;
}