diff mbox series

RDMA/siw: fix error return code in siw_init_module()

Message ID 20190718092710.85709-1-weiyongjun1@huawei.com (mailing list archive)
State Mainlined
Commit d5121ffebc38a16b2419b664e466a2f3e5c7b457
Delegated to: Jason Gunthorpe
Headers show
Series RDMA/siw: fix error return code in siw_init_module() | expand

Commit Message

Wei Yongjun July 18, 2019, 9:27 a.m. UTC
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(+)

Comments

Bernard Metzler July 18, 2019, 10:41 a.m. UTC | #1
-----"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.
Jason Gunthorpe July 22, 2019, 5:43 p.m. UTC | #2
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
diff mbox series

Patch

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;
 	}
 	/*