Commit cfa4eb7b authored by Junxian Huang's avatar Junxian Huang
Browse files

RDMA/hns: Fix mismatched kzalloc vs kvfree

driver inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/IBV8UW



----------------------------------------------------------------------

die_info is allocated with kzalloc() and should be freed
with kfree() instead of kvfree().

Fixes: 2004b3f9 ("RDMA/hns: Support RoCE bonding")
Signed-off-by: default avatarJunxian Huang <huangjunxian6@hisilicon.com>
Signed-off-by: default avatarXinghai Cen <cenxinghai@h-partners.com>
parent cf5c1458
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -606,7 +606,7 @@ static struct hns_roce_die_info *alloc_die_info(int bus_num)
static void dealloc_die_info(struct hns_roce_die_info *die_info, u8 bus_num)
{
	xa_erase(&roce_bond_xa, bus_num);
	kvfree(die_info);
	kfree(die_info);
}

static int alloc_bond_id(struct hns_roce_bond_group *bond_grp)