summaryrefslogtreecommitdiffstats
path: root/drivers/net/amt.c
diff options
context:
space:
mode:
authorYang Yingliang <yangyingliang@huawei.com>2021-11-02 14:03:53 +0100
committerJakub Kicinski <kuba@kernel.org>2021-11-03 03:15:52 +0100
commitdb2434343b2c29817fe1fa63919e9c56218a46e8 (patch)
treecd3207f19b75f5d9472cb879f12597c1307b2f0c /drivers/net/amt.c
parentMAINTAINERS: Update ENA maintainers information (diff)
downloadlinux-db2434343b2c29817fe1fa63919e9c56218a46e8.tar.xz
linux-db2434343b2c29817fe1fa63919e9c56218a46e8.zip
amt: fix error return code in amt_init()
Return error code when alloc_workqueue() fails in amt_init(). Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Reviewed-by: Taehee Yoo <ap420073@gmail.com> Link: https://lore.kernel.org/r/20211102130353.1666999-1-yangyingliang@huawei.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/amt.c')
-rw-r--r--drivers/net/amt.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/amt.c b/drivers/net/amt.c
index 60a7053a9cf7..d8c9ed9f8a81 100644
--- a/drivers/net/amt.c
+++ b/drivers/net/amt.c
@@ -3259,8 +3259,10 @@ static int __init amt_init(void)
goto unregister_notifier;
amt_wq = alloc_workqueue("amt", WQ_UNBOUND, 1);
- if (!amt_wq)
+ if (!amt_wq) {
+ err = -ENOMEM;
goto rtnl_unregister;
+ }
spin_lock_init(&source_gc_lock);
spin_lock_bh(&source_gc_lock);