Commit ef71d472 authored by Junxian Huang's avatar Junxian Huang Committed by ZhouJuan
Browse files

RDMA/hns: Fix a missing kfree() to hr_dev->priv

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: a39f16a1 ("RDMA/hns: fix the error of RoCE VF based on RoCE Bonding PF")
Signed-off-by: default avatarJunxian Huang <huangjunxian6@hisilicon.com>
parent 982688c3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);