aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorColin Ian King <colin.i.king@gmail.com>2025-05-07 14:18:34 +0100
committerLeon Romanovsky <leon@kernel.org>2025-05-12 06:20:24 -0400
commit8536666a52833da326ab17d43ee2cd6c66751716 (patch)
treee8db5de1df4a5338f6227d9bb9bfe6745381aad9
parentRDMA/umem: Separate implicit ODP initialization from explicit ODP (diff)
downloadwireguard-linux-8536666a52833da326ab17d43ee2cd6c66751716.tar.xz
wireguard-linux-8536666a52833da326ab17d43ee2cd6c66751716.zip
RDMA/siw: replace redundant ternary operator with just rv
The use of the ternary operator on rv is redundant, rv is either the initialized value of 0 or a negative error return code, so it can never be greater than zero, and hence the zero assignment in ternary operator is redundant. Just return rv instead. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Link: https://patch.msgid.link/20250507131834.253823-1-colin.i.king@gmail.com Acked-by: Bernard Metzler <bmt@zurich.ibm.com> Signed-off-by: Leon Romanovsky <leon@kernel.org>
-rw-r--r--drivers/infiniband/sw/siw/siw_verbs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/sw/siw/siw_verbs.c b/drivers/infiniband/sw/siw/siw_verbs.c
index 7ce0035c54fa..2b2a7b8e93b0 100644
--- a/drivers/infiniband/sw/siw/siw_verbs.c
+++ b/drivers/infiniband/sw/siw/siw_verbs.c
@@ -1102,7 +1102,7 @@ int siw_post_receive(struct ib_qp *base_qp, const struct ib_recv_wr *wr,
siw_dbg_qp(qp, "error %d\n", rv);
*bad_wr = wr;
}
- return rv > 0 ? 0 : rv;
+ return rv;
}
int siw_destroy_cq(struct ib_cq *base_cq, struct ib_udata *udata)