Commit 4bab6d95 authored by Dan Carpenter's avatar Dan Carpenter Committed by Jason Gunthorpe
Browse files

RDMA/irdma: Fix positive vs negative error codes in irdma_post_send()

This code accidentally returns positive EINVAL instead of negative
-EINVAL.  Some of the callers treat positive returns as success.
Add the missing '-' char.

Fixes: a24a29c8 ("RDMA/irdma: Add Atomic Operations support")
Link: https://patch.msgid.link/r/aNKCjcD6Nab1jWEV@stanley.mountain


Signed-off-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: default avatarJason Gunthorpe <jgg@nvidia.com>
parent 7fcf00bd
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -3966,7 +3966,7 @@ static int irdma_post_send(struct ib_qp *ibqp,
		case IB_WR_ATOMIC_CMP_AND_SWP:
			if (unlikely(!(dev->hw_attrs.uk_attrs.feature_flags &
				       IRDMA_FEATURE_ATOMIC_OPS))) {
				err = EINVAL;
				err = -EINVAL;
				break;
			}
			info.op_type = IRDMA_OP_TYPE_ATOMIC_COMPARE_AND_SWAP;
@@ -3983,7 +3983,7 @@ static int irdma_post_send(struct ib_qp *ibqp,
		case IB_WR_ATOMIC_FETCH_AND_ADD:
			if (unlikely(!(dev->hw_attrs.uk_attrs.feature_flags &
				       IRDMA_FEATURE_ATOMIC_OPS))) {
				err = EINVAL;
				err = -EINVAL;
				break;
			}
			info.op_type = IRDMA_OP_TYPE_ATOMIC_FETCH_AND_ADD;