summaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorMichal Swiatkowski <michal.swiatkowski@linux.intel.com>2022-08-17 10:53:20 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-09-15 11:30:05 +0200
commit3e245b0e21685e4bff4f930f9127313da70b67e6 (patch)
tree047bea1d33832e92002f5897ab13142f65b5dd39 /drivers/net
parent8527c9a6bf8e54fef0a8d3d7d8874a48c725c915 (diff)
downloadlinux-stable-3e245b0e21685e4bff4f930f9127313da70b67e6.tar.gz
linux-stable-3e245b0e21685e4bff4f930f9127313da70b67e6.tar.bz2
linux-stable-3e245b0e21685e4bff4f930f9127313da70b67e6.zip
ice: use bitmap_free instead of devm_kfree
[ Upstream commit 59ac325557b6c14f1f793b90d3946bc145ffa085 ] 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") Signed-off-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com> Tested-by: Gurucharan <gurucharanx.g@intel.com> (A Contingent worker at Intel) Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/ethernet/intel/ice/ice_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
index b9d45c7dbef1..63ae4674d200 100644
--- a/drivers/net/ethernet/intel/ice/ice_main.c
+++ b/drivers/net/ethernet/intel/ice/ice_main.c
@@ -3549,7 +3549,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;
}