aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorAndy Grover <andy.grover@oracle.com>2010-10-28 11:40:57 -0400
committerDavid S. Miller <davem@davemloft.net>2010-10-30 19:34:17 -0400
commitf4a3fc03c1d73753879fb655b8cd628b29f6706b (patch)
treead16a35e587408a396f2ab8e485428b8730fe733 /net
parenta09f69c49b84b161ebd4dd09d3cce1b68297f1d3 (diff)
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.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,
664 } 664 }
665 op->op_bytes = nr_bytes; 665 op->op_bytes = nr_bytes;
666 666
667 ret = 0;
668out: 667out:
669 kfree(pages); 668 kfree(pages);
670 if (ret) 669 if (ret)
671 rds_rdma_free_op(op); 670 rds_rdma_free_op(op);
672 671 else
673 rds_stats_inc(s_send_rdma); 672 rds_stats_inc(s_send_rdma);
674 673
675 return ret; 674 return ret;
676} 675}