linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH net-next] net: qrtr: ns: Fix error return code in qrtr_ns_init()
  2021-05-19 14:16 [PATCH net-next] net: qrtr: ns: Fix error return code in qrtr_ns_init() Wei Yongjun
@ 2021-05-19 14:15 ` Manivannan Sadhasivam
  2021-05-19 14:18 ` Manivannan Sadhasivam
  1 sibling, 0 replies; 4+ messages in thread
From: Manivannan Sadhasivam @ 2021-05-19 14:15 UTC (permalink / raw)
  To: Wei Yongjun
  Cc: David S. Miller, Jakub Kicinski, linux-arm-msm, netdev,
	kernel-janitors, Hulk Robot

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@huawei.com>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>

Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>

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

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

* [PATCH net-next] net: qrtr: ns: Fix error return code in qrtr_ns_init()
@ 2021-05-19 14:16 Wei Yongjun
  2021-05-19 14:15 ` Manivannan Sadhasivam
  2021-05-19 14:18 ` Manivannan Sadhasivam
  0 siblings, 2 replies; 4+ messages in thread
From: Wei Yongjun @ 2021-05-19 14:16 UTC (permalink / raw)
  To: weiyongjun1, Manivannan Sadhasivam, David S. Miller, Jakub Kicinski
  Cc: linux-arm-msm, netdev, kernel-janitors, Hulk Robot

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@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 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;
 


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

* Re: [PATCH net-next] net: qrtr: ns: Fix error return code in qrtr_ns_init()
  2021-05-19 14:16 [PATCH net-next] net: qrtr: ns: Fix error return code in qrtr_ns_init() Wei Yongjun
  2021-05-19 14:15 ` Manivannan Sadhasivam
@ 2021-05-19 14:18 ` Manivannan Sadhasivam
  2021-05-19 15:26   ` weiyongjun (A)
  1 sibling, 1 reply; 4+ messages in thread
From: Manivannan Sadhasivam @ 2021-05-19 14:18 UTC (permalink / raw)
  To: Wei Yongjun
  Cc: David S. Miller, Jakub Kicinski, linux-arm-msm, netdev,
	kernel-janitors, Hulk Robot

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@huawei.com>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.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;
>  
> 

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

* Re: [PATCH net-next] net: qrtr: ns: Fix error return code in qrtr_ns_init()
  2021-05-19 14:18 ` Manivannan Sadhasivam
@ 2021-05-19 15:26   ` weiyongjun (A)
  0 siblings, 0 replies; 4+ messages in thread
From: weiyongjun (A) @ 2021-05-19 15:26 UTC (permalink / raw)
  To: Manivannan Sadhasivam
  Cc: David S. Miller, Jakub Kicinski, linux-arm-msm, netdev,
	kernel-janitors, Hulk Robot


> 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@huawei.com>
>> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> You might want to add Fixes tag:
>
> Fixes: c6e08d6251f3 ("net: qrtr: Allocate workqueue before kernel_bind")
>

Thanks, I will add fixes tag and send v2.

Regards,

Wei Yongjun



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

end of thread, other threads:[~2021-05-19 15:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-19 14:16 [PATCH net-next] net: qrtr: ns: Fix error return code in qrtr_ns_init() Wei Yongjun
2021-05-19 14:15 ` Manivannan Sadhasivam
2021-05-19 14:18 ` Manivannan Sadhasivam
2021-05-19 15:26   ` weiyongjun (A)

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).