diff options
author | Wang Wensheng <wangwensheng4@huawei.com> | 2021-04-08 11:31:32 +0000 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2021-04-12 20:18:35 -0300 |
commit | 6bc950beff0c440ac567cdc4e7f4542a9920953d (patch) | |
tree | f8758847246b92eca915be649ed6242fb18cb97e /drivers/infiniband/ulp | |
parent | 5aa54bd28ce2b066d82cdd515269b9d562bd6e66 (diff) |
RDMA/srpt: Fix error return code in srpt_cm_req_recv()
Fix to return a negative error code from the error handling case instead
of 0, as done elsewhere in this function.
Fixes: db7683d7deb2 ("IB/srpt: Fix login-related race conditions")
Link: https://lore.kernel.org/r/20210408113132.87250-1-wangwensheng4@huawei.com
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wang Wensheng <wangwensheng4@huawei.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers/infiniband/ulp')
-rw-r--r-- | drivers/infiniband/ulp/srpt/ib_srpt.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c index 5b8849c6d79a..eadabf7d0d6b 100644 --- a/drivers/infiniband/ulp/srpt/ib_srpt.c +++ b/drivers/infiniband/ulp/srpt/ib_srpt.c @@ -2378,6 +2378,7 @@ static int srpt_cm_req_recv(struct srpt_device *const sdev, pr_info("rejected SRP_LOGIN_REQ because target %s_%d is not enabled\n", dev_name(&sdev->device->dev), port_num); mutex_unlock(&sport->mutex); + ret = -EINVAL; goto reject; } |