summaryrefslogtreecommitdiffstats
path: root/net/rds
diff options
context:
space:
mode:
authorZhu Yanjun <yanjun.zhu@oracle.com>2017-03-13 01:43:45 -0400
committerDavid S. Miller <davem@davemloft.net>2017-03-13 23:20:05 -0700
commitb418c5276a41c821c25410542df83d283bbc0b2a (patch)
treed6d1940d0234362f1809b04b3921c82af8918c8c /net/rds
parent62a9fa01add88082b32096211e0a88016e996713 (diff)
downloadlinux-b418c5276a41c821c25410542df83d283bbc0b2a.tar.bz2
rds: ib: drop unnecessary rdma_reject
When rdma_accept fails, rdma_reject is called in it. As such, it is not necessary to execute rdma_reject again. Cc: Joe Jin <joe.jin@oracle.com> Cc: Junxiao Bi <junxiao.bi@oracle.com> Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com> Signed-off-by: Zhu Yanjun <yanjun.zhu@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/rds')
-rw-r--r--net/rds/ib_cm.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/rds/ib_cm.c b/net/rds/ib_cm.c
index ce3775abc6e7..11d535b16125 100644
--- a/net/rds/ib_cm.c
+++ b/net/rds/ib_cm.c
@@ -677,9 +677,8 @@ int rds_ib_cm_handle_connect(struct rdma_cm_id *cm_id,
event->param.conn.initiator_depth);
/* rdma_accept() calls rdma_reject() internally if it fails */
- err = rdma_accept(cm_id, &conn_param);
- if (err)
- rds_ib_conn_error(conn, "rdma_accept failed (%d)\n", err);
+ if (rdma_accept(cm_id, &conn_param))
+ rds_ib_conn_error(conn, "rdma_accept failed\n");
out:
if (conn)