From: Junxian Huang huangjunxian6@hisilicon.com
driver inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I7A2V2
---------------------------------------------------------------
When vf check fails, the current code dealloc ib_dev without kfree hr_dev->priv. This patch fixes this error.
Fixes: a39f16a15b67 ("RDMA/hns: fix the error of RoCE VF based on RoCE Bonding PF") Signed-off-by: Junxian Huang huangjunxian6@hisilicon.com --- drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c index 7c5ccb5caeb3..ca4a1e2d8064 100644 --- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c +++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c @@ -7275,7 +7275,7 @@ static int __hns_roce_hw_v2_init_instance(struct hnae3_handle *handle)
if (hr_dev->is_vf && !check_vf_support(hr_dev->pci_dev)) { ret = -EOPNOTSUPP; - goto error_failed_kzalloc; + goto error_failed_roce_init; }
ret = hns_roce_init(hr_dev);