From: Lijun Ou Date: Mon, 30 Jul 2018 12:20:28 +0000 (+0800) Subject: RDMA/hns: Modify qp will return errno when qp type is illegal X-Git-Tag: v4.19~309^2~77 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ac7cbf96c20991dbeea0af04ca9ff25252af9e5f;p=platform%2Fkernel%2Flinux-rpi.git RDMA/hns: Modify qp will return errno when qp type is illegal Set for ret was missing in the error path here, resulting in incorrect error code for modify_qp. Signed-off-by: Lijun Ou Signed-off-by: Jason Gunthorpe --- diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c index b495842..39842ec 100644 --- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c +++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c @@ -3447,6 +3447,7 @@ static int hns_roce_v2_modify_qp(struct ib_qp *ibqp, ; } else { dev_err(dev, "Illegal state for QP!\n"); + ret = -EINVAL; goto out; }