netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Taehee Yoo <ap420073@gmail.com>
To: Yang Yingliang <yangyingliang@huawei.com>,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Cc: kuba@kernel.org, davem@davemloft.net
Subject: Re: [PATCH net-next] amt: fix error return code in amt_init()
Date: Tue, 2 Nov 2021 23:12:21 +0900	[thread overview]
Message-ID: <cf76ccea-5678-4ed4-7bda-d9a522f31d61@gmail.com> (raw)
In-Reply-To: <20211102130353.1666999-1-yangyingliang@huawei.com>

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>

  reply	other threads:[~2021-11-02 14:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2021-11-03  2:30 ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cf76ccea-5678-4ed4-7bda-d9a522f31d61@gmail.com \
    --to=ap420073@gmail.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=yangyingliang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).