Skip to content

Commit 8536666

Browse files
ColinIanKingrleon
authored andcommitted
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 <[email protected]> Link: https://patch.msgid.link/[email protected] Acked-by: Bernard Metzler <[email protected]> Signed-off-by: Leon Romanovsky <[email protected]>
1 parent 15a9f67 commit 8536666

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/infiniband/sw/siw/siw_verbs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1102,7 +1102,7 @@ int siw_post_receive(struct ib_qp *base_qp, const struct ib_recv_wr *wr,
11021102
siw_dbg_qp(qp, "error %d\n", rv);
11031103
*bad_wr = wr;
11041104
}
1105-
return rv > 0 ? 0 : rv;
1105+
return rv;
11061106
}
11071107

11081108
int siw_destroy_cq(struct ib_cq *base_cq, struct ib_udata *udata)

0 commit comments

Comments
 (0)