diff mbox series

RDMA/cma: fix false error message

Message ID 20190902092731.1055757-1-haakon.bugge@oracle.com (mailing list archive)
State Mainlined
Commit a6e4d254c19b541a58caced322111084b27a7788
Delegated to: Jason Gunthorpe
Headers show
Series RDMA/cma: fix false error message | expand

Commit Message

Haakon Bugge Sept. 2, 2019, 9:27 a.m. UTC
In addr_handler(), assuming status == 0 and the device already has
been acquired (id_priv->cma_dev != NULL), we get the following
incorrect "error" message:

RDMA CM: ADDR_ERROR: failed to resolve IP. status 0

Signed-off-by: Håkon Bugge <haakon.bugge@oracle.com>
---
 drivers/infiniband/core/cma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jason Gunthorpe Sept. 12, 2019, 1:25 p.m. UTC | #1
On Mon, Sep 02, 2019 at 11:27:31AM +0200, Håkon Bugge wrote:
> In addr_handler(), assuming status == 0 and the device already has
> been acquired (id_priv->cma_dev != NULL), we get the following
> incorrect "error" message:
> 
> RDMA CM: ADDR_ERROR: failed to resolve IP. status 0
> 
> Signed-off-by: Håkon Bugge <haakon.bugge@oracle.com>

I added a fixes line, please don't forget

Applied to for-next

Thanks,
Jason
diff mbox series

Patch

diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c
index 19f1730a4f24..c7985c24f914 100644
--- a/drivers/infiniband/core/cma.c
+++ b/drivers/infiniband/core/cma.c
@@ -3046,7 +3046,7 @@  static void addr_handler(int status, struct sockaddr *src_addr,
 		if (status)
 			pr_debug_ratelimited("RDMA CM: ADDR_ERROR: failed to acquire device. status %d\n",
 					     status);
-	} else {
+	} else if (status) {
 		pr_debug_ratelimited("RDMA CM: ADDR_ERROR: failed to resolve IP. status %d\n", status);
 	}