RDMA/core: Fix return error value in _ib_modify_qp() to negative
[ Upstream commit47fda651d5] The error codes in _ib_modify_qp() are supposed to be negative errno. Fixes:7a5c938b9e("IB/core: Check for rdma_protocol_ib only after validating port_num") Link: https://lore.kernel.org/r/1595645787-20375-1-git-send-email-liheng40@huawei.com Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Li Heng <liheng40@huawei.com> Reviewed-by: Parav Pandit <parav@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
e3e983b327
commit
b6be0b71ea
1 changed files with 1 additions and 1 deletions
|
|
@ -1617,7 +1617,7 @@ static int _ib_modify_qp(struct ib_qp *qp, struct ib_qp_attr *attr,
|
|||
if (!(rdma_protocol_ib(qp->device,
|
||||
attr->alt_ah_attr.port_num) &&
|
||||
rdma_protocol_ib(qp->device, port))) {
|
||||
ret = EINVAL;
|
||||
ret = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue