[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <cf76ccea-5678-4ed4-7bda-d9a522f31d61@gmail.com>
Date: Tue, 2 Nov 2021 23:12:21 +0900
From: Taehee Yoo <ap420073@...il.com>
To: Yang Yingliang <yangyingliang@...wei.com>,
linux-kernel@...r.kernel.org, netdev@...r.kernel.org
Cc: kuba@...nel.org, davem@...emloft.net
Subject: Re: [PATCH net-next] amt: fix error return code in amt_init()
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@...wei.com>
> Signed-off-by: Yang Yingliang <yangyingliang@...wei.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@...il.com>
Powered by blists - more mailing lists