diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2005-06-22 17:16:20 +0000 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2005-06-22 16:07:03 -0400 |
commit | 5b616f5d596c0b056129f8aeafbc08409b3cd050 (patch) | |
tree | bdbd2eb5bd1f8a26c7287e21be25ec50db075459 /net/sunrpc/pmap_clnt.c | |
parent | 334ccfd545bba9690515f2c5c167d5adb161989b (diff) | |
download | kernel_samsung_smdk4412-5b616f5d596c0b056129f8aeafbc08409b3cd050.zip kernel_samsung_smdk4412-5b616f5d596c0b056129f8aeafbc08409b3cd050.tar.gz kernel_samsung_smdk4412-5b616f5d596c0b056129f8aeafbc08409b3cd050.tar.bz2 |
[PATCH] RPC: Make rpc_create_client() destroy the transport on failure.
This saves us a couple of lines of cleanup code for each call.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc/pmap_clnt.c')
-rw-r--r-- | net/sunrpc/pmap_clnt.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/net/sunrpc/pmap_clnt.c b/net/sunrpc/pmap_clnt.c index d0b1d2c..97c420f 100644 --- a/net/sunrpc/pmap_clnt.c +++ b/net/sunrpc/pmap_clnt.c @@ -210,9 +210,7 @@ pmap_create(char *hostname, struct sockaddr_in *srvaddr, int proto) clnt = rpc_create_client(xprt, hostname, &pmap_program, RPC_PMAP_VERSION, RPC_AUTH_UNIX); - if (IS_ERR(clnt)) { - xprt_destroy(xprt); - } else { + if (!IS_ERR(clnt)) { clnt->cl_softrtry = 1; clnt->cl_chatty = 1; clnt->cl_oneshot = 1; |