提交 f4a3fc03 编写于 作者: A Andy Grover 提交者: David S. Miller

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: NAndy Grover <andy.grover@oracle.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 a09f69c4
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册