RDMA/hns: Add return operation when configured global param fail
authoroulijun <oulijun@huawei.com>
Fri, 4 May 2018 02:57:07 +0000 (10:57 +0800)
committerDoug Ledford <dledford@redhat.com>
Wed, 9 May 2018 14:45:18 +0000 (10:45 -0400)
When configure global param function run fail, it should directly return
and the initial flow will stop.

Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/hns/hns_roce_hw_v2.c

index 50f55bd..539b0ca 100644 (file)
@@ -1085,6 +1085,7 @@ static int hns_roce_v2_profile(struct hns_roce_dev *hr_dev)
        if (ret) {
                dev_err(hr_dev->dev, "Configure global param fail, ret = %d.\n",
                        ret);
+               return ret;
        }
 
        /* Get pf resource owned by every pf */