linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] RDMA/siw: fix error return code in siw_init_module()
@ 2019-07-18  9:27 Wei Yongjun
  2019-07-18 10:41 ` Bernard Metzler
  2019-07-22 17:43 ` Jason Gunthorpe
  0 siblings, 2 replies; 3+ messages in thread
From: Wei Yongjun @ 2019-07-18  9:27 UTC (permalink / raw)
  To: Bernard Metzler, Doug Ledford, Jason Gunthorpe
  Cc: Wei Yongjun, linux-rdma, kernel-janitors

Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.

Fixes: bdcf26bf9b3a ("rdma/siw: network and RDMA core interface")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/infiniband/sw/siw/siw_main.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/infiniband/sw/siw/siw_main.c b/drivers/infiniband/sw/siw/siw_main.c
index fd2552a9091d..9040692f83d7 100644
--- a/drivers/infiniband/sw/siw/siw_main.c
+++ b/drivers/infiniband/sw/siw/siw_main.c
@@ -614,6 +614,7 @@ static __init int siw_init_module(void)
 
 	if (!siw_create_tx_threads()) {
 		pr_info("siw: Could not start any TX thread\n");
+		rv = -ENOMEM;
 		goto out_error;
 	}
 	/*




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

* Re: [PATCH] RDMA/siw: fix error return code in siw_init_module()
  2019-07-18  9:27 [PATCH] RDMA/siw: fix error return code in siw_init_module() Wei Yongjun
@ 2019-07-18 10:41 ` Bernard Metzler
  2019-07-22 17:43 ` Jason Gunthorpe
  1 sibling, 0 replies; 3+ messages in thread
From: Bernard Metzler @ 2019-07-18 10:41 UTC (permalink / raw)
  To: Wei Yongjun; +Cc: Doug Ledford, Jason Gunthorpe, linux-rdma, kernel-janitors

-----"Wei Yongjun" <weiyongjun1@huawei.com> wrote: -----

>To: "Bernard Metzler" <bmt@zurich.ibm.com>, "Doug Ledford"
><dledford@redhat.com>, "Jason Gunthorpe" <jgg@ziepe.ca>
>From: "Wei Yongjun" <weiyongjun1@huawei.com>
>Date: 07/18/2019 11:21AM
>Cc: "Wei Yongjun" <weiyongjun1@huawei.com>,
><linux-rdma@vger.kernel.org>, <kernel-janitors@vger.kernel.org>
>Subject: [EXTERNAL] [PATCH] RDMA/siw: fix error return code in
>siw_init_module()
>
>Fix to return a negative error code from the error handling
>case instead of 0, as done elsewhere in this function.
>
>Fixes: bdcf26bf9b3a ("rdma/siw: network and RDMA core interface")
>Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
>---
> drivers/infiniband/sw/siw/siw_main.c | 1 +
> 1 file changed, 1 insertion(+)
>
>diff --git a/drivers/infiniband/sw/siw/siw_main.c
>b/drivers/infiniband/sw/siw/siw_main.c
>index fd2552a9091d..9040692f83d7 100644
>--- a/drivers/infiniband/sw/siw/siw_main.c
>+++ b/drivers/infiniband/sw/siw/siw_main.c
>@@ -614,6 +614,7 @@ static __init int siw_init_module(void)
> 
> 	if (!siw_create_tx_threads()) {
> 		pr_info("siw: Could not start any TX thread\n");
>+		rv = -ENOMEM;
> 		goto out_error;
> 	}
> 	/*
>
>
>
>
Yes, thanks Wei!

Bernard.


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

* Re: [PATCH] RDMA/siw: fix error return code in siw_init_module()
  2019-07-18  9:27 [PATCH] RDMA/siw: fix error return code in siw_init_module() Wei Yongjun
  2019-07-18 10:41 ` Bernard Metzler
@ 2019-07-22 17:43 ` Jason Gunthorpe
  1 sibling, 0 replies; 3+ messages in thread
From: Jason Gunthorpe @ 2019-07-22 17:43 UTC (permalink / raw)
  To: Wei Yongjun; +Cc: Bernard Metzler, Doug Ledford, linux-rdma, kernel-janitors

On Thu, Jul 18, 2019 at 09:27:10AM +0000, Wei Yongjun wrote:
> Fix to return a negative error code from the error handling
> case instead of 0, as done elsewhere in this function.
> 
> Fixes: bdcf26bf9b3a ("rdma/siw: network and RDMA core interface")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
>  drivers/infiniband/sw/siw/siw_main.c | 1 +
>  1 file changed, 1 insertion(+)

Applied to for-rc, thanks

Jason

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

end of thread, other threads:[~2019-07-22 17:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-18  9:27 [PATCH] RDMA/siw: fix error return code in siw_init_module() Wei Yongjun
2019-07-18 10:41 ` Bernard Metzler
2019-07-22 17:43 ` Jason Gunthorpe

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