Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[sfrench/cifs-2.6.git] / drivers / infiniband / hw / hns / hns_roce_hw_v1.c
index 81e6dedb1e022c81990ee7e01bc80a0a7b9ec3f9..c07e387a07a38b88a02d175e6ddd889e13ef00bf 100644 (file)
@@ -750,8 +750,10 @@ static int hns_roce_v1_rsv_lp_qp(struct hns_roce_dev *hr_dev)
        atomic_set(&free_mr->mr_free_cq->ib_cq.usecnt, 0);
 
        pd = rdma_zalloc_drv_obj(ibdev, ib_pd);
-       if (!pd)
+       if (!pd) {
+               ret = -ENOMEM;
                goto alloc_mem_failed;
+       }
 
        pd->device  = ibdev;
        ret = hns_roce_alloc_pd(pd, NULL);