Commit f22b4e6f authored by Bo Sun's avatar Bo Sun Committed by Jakub Kicinski
Browse files

octeontx2-af: CGX: replace kfree() with rvu_free_bitmap()



mac_to_index_bmap is allocated with rvu_alloc_bitmap(), so free it
with rvu_free_bitmap() instead of open-coding kfree(.bmap) to keep
the alloc/free API pairing consistent.

Signed-off-by: default avatarBo Sun <bo@mboxify.com>
Reviewed-by: default avatarVadim Fedorenko <vadim.fedorenko@linux.dev>
Reviewed-by: default avatarJijie Shao <shaojijie@huawei.com>
Link: https://patch.msgid.link/20260225082348.2519131-1-bo@mboxify.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent d68d21ea
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1822,7 +1822,7 @@ static int cgx_lmac_exit(struct cgx *cgx)
			continue;
		cgx->mac_ops->mac_pause_frm_config(cgx, lmac->lmac_id, false);
		cgx_configure_interrupt(cgx, lmac, lmac->lmac_id, true);
		kfree(lmac->mac_to_index_bmap.bmap);
		rvu_free_bitmap(&lmac->mac_to_index_bmap);
		rvu_free_bitmap(&lmac->rx_fc_pfvf_bmap);
		rvu_free_bitmap(&lmac->tx_fc_pfvf_bmap);
		kfree(lmac->name);