[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210519141801.GB119648@thinkpad>
Date: Wed, 19 May 2021 19:48:01 +0530
From: Manivannan Sadhasivam <mani@...nel.org>
To: Wei Yongjun <weiyongjun1@...wei.com>
Cc: "David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
linux-arm-msm@...r.kernel.org, netdev@...r.kernel.org,
kernel-janitors@...r.kernel.org, Hulk Robot <hulkci@...wei.com>
Subject: Re: [PATCH net-next] net: qrtr: ns: Fix error return code in
qrtr_ns_init()
On Wed, May 19, 2021 at 02:16:21PM +0000, Wei Yongjun wrote:
> Fix to return a negative error code -ENOMEM from the error handling
> case instead of 0, as done elsewhere in this function.
>
> Reported-by: Hulk Robot <hulkci@...wei.com>
> Signed-off-by: Wei Yongjun <weiyongjun1@...wei.com>
You might want to add Fixes tag:
Fixes: c6e08d6251f3 ("net: qrtr: Allocate workqueue before kernel_bind")
Thanks,
Mani
> ---
> net/qrtr/ns.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/net/qrtr/ns.c b/net/qrtr/ns.c
> index 8d00dfe8139e..1990d496fcfc 100644
> --- a/net/qrtr/ns.c
> +++ b/net/qrtr/ns.c
> @@ -775,8 +775,10 @@ int qrtr_ns_init(void)
> }
>
> qrtr_ns.workqueue = alloc_workqueue("qrtr_ns_handler", WQ_UNBOUND, 1);
> - if (!qrtr_ns.workqueue)
> + if (!qrtr_ns.workqueue) {
> + ret = -ENOMEM;
> goto err_sock;
> + }
>
> qrtr_ns.sock->sk->sk_data_ready = qrtr_ns_data_ready;
>
>
Powered by blists - more mailing lists