aboutsummaryrefslogtreecommitdiffstats
path: root/net/rds/tcp_connect.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/rds/tcp_connect.c')
-rw-r--r--net/rds/tcp_connect.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/rds/tcp_connect.c b/net/rds/tcp_connect.c
index a65ee78db0c5..f9f564a6c960 100644
--- a/net/rds/tcp_connect.c
+++ b/net/rds/tcp_connect.c
@@ -106,11 +106,14 @@ int rds_tcp_conn_connect(struct rds_connection *conn)
106 rds_tcp_set_callbacks(sock, conn); 106 rds_tcp_set_callbacks(sock, conn);
107 ret = sock->ops->connect(sock, (struct sockaddr *)&dest, sizeof(dest), 107 ret = sock->ops->connect(sock, (struct sockaddr *)&dest, sizeof(dest),
108 O_NONBLOCK); 108 O_NONBLOCK);
109 sock = NULL;
110 109
111 rdsdebug("connect to address %pI4 returned %d\n", &conn->c_faddr, ret); 110 rdsdebug("connect to address %pI4 returned %d\n", &conn->c_faddr, ret);
112 if (ret == -EINPROGRESS) 111 if (ret == -EINPROGRESS)
113 ret = 0; 112 ret = 0;
113 if (ret == 0)
114 sock = NULL;
115 else
116 rds_tcp_restore_callbacks(sock, conn->c_transport_data);
114 117
115out: 118out:
116 if (sock) 119 if (sock)