diff options
author | Andy Grover <andy.grover@oracle.com> | 2010-10-28 17:40:57 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-10-31 01:34:17 +0200 |
commit | f4a3fc03c1d73753879fb655b8cd628b29f6706b (patch) | |
tree | ad16a35e587408a396f2ab8e485428b8730fe733 /net | |
parent | RDS: Return -EINVAL if rds_rdma_pages returns an error (diff) | |
download | linux-f4a3fc03c1d73753879fb655b8cd628b29f6706b.tar.xz 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')
-rw-r--r-- | net/rds/rdma.c | 5 |
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; } |