mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-12 18:35:35 -04:00
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>
This commit is contained in:
committed by
Leon Romanovsky
parent
15a9f67e28
commit
8536666a52
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user