All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] amt: fix error return code in amt_init()
@ 2021-11-02 13:03 Yang Yingliang
  2021-11-02 14:12 ` Taehee Yoo
  2021-11-03  2:30 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Yang Yingliang @ 2021-11-02 13:03 UTC (permalink / raw)
  To: linux-kernel, netdev; +Cc: kuba, davem, ap420073

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>
---
 drivers/net/amt.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

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);
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-11-03  2:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-02 13:03 [PATCH net-next] amt: fix error return code in amt_init() Yang Yingliang
2021-11-02 14:12 ` Taehee Yoo
2021-11-03  2:30 ` patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.