summaryrefslogtreecommitdiffstats
path: root/net/sunrpc/xprtsock.c
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2011-02-22 21:54:34 +0000
committerTrond Myklebust <Trond.Myklebust@netapp.com>2011-03-10 15:04:58 -0500
commit4cea288aaf0e11647880cc487350b1dc45d9febc (patch)
tree6ea19d6d0b7b833f39077941a795f83b81448b36 /net/sunrpc/xprtsock.c
parent3fa0b4e201d254b52a251fa348bd53e53000cff6 (diff)
downloadop-kernel-dev-4cea288aaf0e11647880cc487350b1dc45d9febc.zip
op-kernel-dev-4cea288aaf0e11647880cc487350b1dc45d9febc.tar.gz
sunrpc: Propagate errors from xs_bind() through xs_create_sock()
xs_create_sock() is supposed to return a pointer or an ERR_PTR-encoded error, but it currently returns 0 if xs_bind() fails. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Cc: stable@kernel.org [v2.6.37] Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc/xprtsock.c')
-rw-r--r--net/sunrpc/xprtsock.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
index c431f5a..be96d42 100644
--- a/net/sunrpc/xprtsock.c
+++ b/net/sunrpc/xprtsock.c
@@ -1631,7 +1631,8 @@ static struct socket *xs_create_sock(struct rpc_xprt *xprt,
}
xs_reclassify_socket(family, sock);
- if (xs_bind(transport, sock)) {
+ err = xs_bind(transport, sock);
+ if (err) {
sock_release(sock);
goto out;
}
OpenPOWER on IntegriCloud