projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a09f69c
)
RDS: Clean up error handling in rds_cmsg_rdma_args
author
Andy Grover
<andy.grover@oracle.com>
Thu, 28 Oct 2010 15:40:57 +0000
(15:40 +0000)
committer
David S. Miller
<davem@davemloft.net>
Sat, 30 Oct 2010 23:34:17 +0000
(16:34 -0700)
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>
net/rds/rdma.c
patch
|
blob
|
history
diff --git
a/net/rds/rdma.c
b/net/rds/rdma.c
index d0ba2ca3b71457576c95dfe1f070003b6f663944..334acdd32ab676552e48ab23006f5b75c136f970 100644
(file)
--- 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;
}