* [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
* Re: [PATCH net-next] amt: fix error return code in amt_init()
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
1 sibling, 0 replies; 3+ messages in thread
From: Taehee Yoo @ 2021-11-02 14:12 UTC (permalink / raw)
To: Yang Yingliang, linux-kernel, netdev; +Cc: kuba, davem
Hi Yang,
On 11/2/21 10:03 PM, Yang Yingliang wrote:
> 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);
>
Reviewed-by: Taehee Yoo <ap420073@gmail.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] amt: fix error return code in amt_init()
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
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-11-03 2:30 UTC (permalink / raw)
To: Yang Yingliang; +Cc: linux-kernel, netdev, kuba, davem, ap420073
Hello:
This patch was applied to netdev/net.git (master)
by Jakub Kicinski <kuba@kernel.org>:
On Tue, 2 Nov 2021 21:03:53 +0800 you wrote:
> 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(-)
Here is the summary with links:
- [net-next] amt: fix error return code in amt_init()
https://git.kernel.org/netdev/net/c/db2434343b2c
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).