mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 15:49:17 -04:00
RDMA/qedr: Fix error return code in qedr_iw_connect()
[ Upstream commit 10dd83dbcd157baf7a78a09ddb2f84c627bc7f1d ]
Fix to return a negative error code from the error handling case instead
of 0, as done elsewhere in this function.
Fixes: 82af6d19d8d9 ("RDMA/qedr: Fix synchronization methods and memory leaks in qedr")
Link: https://lore.kernel.org/r/20210408113135.92165-1-wangwensheng4@huawei.com
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wang Wensheng <wangwensheng4@huawei.com>
Acked-by: Michal Kalderon <michal.kalderon@marvell.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
bf365066fb
commit
53656a2a01
1 changed files with 3 additions and 1 deletions
|
|
@ -636,8 +636,10 @@ int qedr_iw_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
|
|||
memcpy(in_params.local_mac_addr, dev->ndev->dev_addr, ETH_ALEN);
|
||||
|
||||
if (test_and_set_bit(QEDR_IWARP_CM_WAIT_FOR_CONNECT,
|
||||
&qp->iwarp_cm_flags))
|
||||
&qp->iwarp_cm_flags)) {
|
||||
rc = -ENODEV;
|
||||
goto err; /* QP already being destroyed */
|
||||
}
|
||||
|
||||
rc = dev->ops->iwarp_connect(dev->rdma_ctx, &in_params, &out_params);
|
||||
if (rc) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue