rds: ib: drop unnecessary rdma_reject
authorZhu Yanjun <yanjun.zhu@oracle.com>
Mon, 13 Mar 2017 05:43:45 +0000 (01:43 -0400)
committerDavid S. Miller <davem@davemloft.net>
Tue, 14 Mar 2017 06:20:05 +0000 (23:20 -0700)
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>
net/rds/ib_cm.c

index ce3775abc6e7a1d30e335aaea749a9840e949786..11d535b161255124510cd4ab2a8f7dcc62c2eaae 100644 (file)
@@ -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)