diff options
author | Zhu Yanjun <yanjun.zhu@oracle.com> | 2017-03-13 01:43:45 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-03-14 02:20:05 -0400 |
commit | b418c5276a41c821c25410542df83d283bbc0b2a (patch) | |
tree | d6d1940d0234362f1809b04b3921c82af8918c8c /net/rds | |
parent | 62a9fa01add88082b32096211e0a88016e996713 (diff) |
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.c | 5 |
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, | |||
677 | event->param.conn.initiator_depth); | 677 | event->param.conn.initiator_depth); |
678 | 678 | ||
679 | /* rdma_accept() calls rdma_reject() internally if it fails */ | 679 | /* rdma_accept() calls rdma_reject() internally if it fails */ |
680 | err = rdma_accept(cm_id, &conn_param); | 680 | if (rdma_accept(cm_id, &conn_param)) |
681 | if (err) | 681 | rds_ib_conn_error(conn, "rdma_accept failed\n"); |
682 | rds_ib_conn_error(conn, "rdma_accept failed (%d)\n", err); | ||
683 | 682 | ||
684 | out: | 683 | out: |
685 | if (conn) | 684 | if (conn) |