drivers/net/ethernet/marvell/octeontx2/af/cgx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
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: Bo Sun <bo@mboxify.com>
Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev>
---
drivers/net/ethernet/marvell/octeontx2/af/cgx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/marvell/octeontx2/af/cgx.c b/drivers/net/ethernet/marvell/octeontx2/af/cgx.c
index 6000795823a3..4f33a816bc7a 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/cgx.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/cgx.c
@@ -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);
on 2026/2/25 16:23, Bo Sun wrote: > 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. Reviewed-by: Jijie Shao <shaojijie@huawei.com> > > Signed-off-by: Bo Sun <bo@mboxify.com> > Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev> > --- > drivers/net/ethernet/marvell/octeontx2/af/cgx.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/ethernet/marvell/octeontx2/af/cgx.c b/drivers/net/ethernet/marvell/octeontx2/af/cgx.c > index 6000795823a3..4f33a816bc7a 100644 > --- a/drivers/net/ethernet/marvell/octeontx2/af/cgx.c > +++ b/drivers/net/ethernet/marvell/octeontx2/af/cgx.c > @@ -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); > >
© 2016 - 2026 Red Hat, Inc.