Commit 8391587a authored by Yuyu Li's avatar Yuyu Li Committed by Xinghai Cen
Browse files

RDMA/hns: Fix ifnullfree static warning

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



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

Fix ifnullfree static warning: NULL check before some freeing
functions is not needed.

Fixes: 21cacb51 ("RDMA/hns: Support write with notify")
Signed-off-by: default avatarYuyu Li <liyuyu6@huawei.com>
Signed-off-by: default avatarXinghai Cen <cenxinghai@h-partners.com>
parent 134671e9
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -133,7 +133,6 @@ int rdma_unregister_notify_addr(struct ib_device *ib_dev)
	if (!is_hns_roce(ib_dev) || !is_write_notify_supported(hr_dev))
		return -EOPNOTSUPP;

	if (hr_dev->notify_tbl)
	kvfree(hr_dev->notify_tbl);

	hr_dev->notify_tbl = NULL;
+2 −2
Original line number Diff line number Diff line
@@ -1607,7 +1607,7 @@ void hns_roce_exit(struct hns_roce_dev *hr_dev, bool bond_cleanup)
	if (hr_dev->hw->cmq_exit)
		hr_dev->hw->cmq_exit(hr_dev);
	hns_roce_dealloc_dfx_cnt(hr_dev);
	if (hr_dev->notify_tbl)

	kvfree(hr_dev->notify_tbl);
}