Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f4a3fc03 authored by Andy Grover's avatar Andy Grover Committed by David S. Miller
Browse files

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: default avatarAndy Grover <andy.grover@oracle.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a09f69c4
Loading
Loading
Loading
Loading
+2 −3
Original line number Original line Diff line number Diff line
@@ -664,12 +664,11 @@ int rds_cmsg_rdma_args(struct rds_sock *rs, struct rds_message *rm,
	}
	}
	op->op_bytes = nr_bytes;
	op->op_bytes = nr_bytes;


	ret = 0;
out:
out:
	kfree(pages);
	kfree(pages);
	if (ret)
	if (ret)
		rds_rdma_free_op(op);
		rds_rdma_free_op(op);

	else
		rds_stats_inc(s_send_rdma);
		rds_stats_inc(s_send_rdma);


	return ret;
	return ret;