summaryrefslogtreecommitdiffstats
path: root/net/rds
diff options
context:
space:
mode:
authorAndy Grover <andy.grover@oracle.com>2010-10-28 15:40:57 +0000
committerDavid S. Miller <davem@davemloft.net>2010-10-30 16:34:17 -0700
commitf4a3fc03c1d73753879fb655b8cd628b29f6706b (patch)
treead16a35e587408a396f2ab8e485428b8730fe733 /net/rds
parenta09f69c49b84b161ebd4dd09d3cce1b68297f1d3 (diff)
downloadblackbird-op-linux-f4a3fc03c1d73753879fb655b8cd628b29f6706b.tar.gz
blackbird-op-linux-f4a3fc03c1d73753879fb655b8cd628b29f6706b.zip
RDS: Clean up error handling in rds_cmsg_rdma_args
We don't need to set ret = 0 at the end -- it's initialized to 0. Also, don't increment s_send_rdma stat if we're exiting with an error. Signed-off-by: Andy Grover <andy.grover@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/rds')
-rw-r--r--net/rds/rdma.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/rds/rdma.c b/net/rds/rdma.c
index d0ba2ca3b714..334acdd32ab6 100644
--- a/net/rds/rdma.c
+++ b/net/rds/rdma.c
@@ -664,13 +664,12 @@ int rds_cmsg_rdma_args(struct rds_sock *rs, struct rds_message *rm,
}
op->op_bytes = nr_bytes;
- ret = 0;
out:
kfree(pages);
if (ret)
rds_rdma_free_op(op);
-
- rds_stats_inc(s_send_rdma);
+ else
+ rds_stats_inc(s_send_rdma);
return ret;
}
OpenPOWER on IntegriCloud