Skip to contentSkip to conversation

ice: use bitmap_free instead of devm_kfree

PATCH In review Michal Swiatkowski 2 participants 2 messages Aug 17, 2022 – Aug 22, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ice: use bitmap_free instead of devm_kfree

pf->avail_txqs was allocated using bitmap_zalloc, bitmap_free should be used to free this memory.

Fixes 78b5713ac1241 ("ice: Alloc queue management bitmaps and arrays dynamically")
---
 drivers/net/ethernet/intel/ice/ice_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/intel/ice/ice_main.c +1 -1
index a7f69c961676..001e45bc0d96 100644
@@ -3926,7 +3926,7 @@ static int ice_init_pf(struct ice_pf *pf)
 
 	pf->avail_rxqs = bitmap_zalloc(pf->max_pf_rxqs, GFP_KERNEL);
 	if (!pf->avail_rxqs) {
-		devm_kfree(ice_pf_to_dev(pf), pf->avail_txqs);
+		bitmap_free(pf->avail_txqs);
 		pf->avail_txqs = NULL;
 		return -ENOMEM;
 	}
Signature · 6 lines
2.36.1

_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
Tested-by on v1 1/1
#1 lore raw
Quoted 13 lines

-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Michal Swiatkowski
Sent: Wednesday, August 17, 2022 2:23 PM
To: [email protected]
Subject: [Intel-wired-lan] [PATCH net v1] ice: use bitmap_free instead of devm_kfree

pf->avail_txqs was allocated using bitmap_zalloc, bitmap_free should be used to free this memory.

Quoted 7 lines
Fixes 78b5713ac1241 ("ice: Alloc queue management bitmaps and arrays

dynamically")

---
 drivers/net/ethernet/intel/ice/ice_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan