net: rds: use maybe_get_net() when acquiring refcount on TCP sockets
[linux-2.6-microblaze.git] / net / rds / tcp_connect.c
index 5461d77..f0c477c 100644 (file)
@@ -124,7 +124,10 @@ int rds_tcp_conn_path_connect(struct rds_conn_path *cp)
        if (ret < 0)
                goto out;
 
-       rds_tcp_tune(sock);
+       if (!rds_tcp_tune(sock)) {
+               ret = -EINVAL;
+               goto out;
+       }
 
        if (isv6) {
                sin6.sin6_family = AF_INET6;