Skip to content

Commit

Permalink
ice: use bitmap_free instead of devm_kfree
Browse files Browse the repository at this point in the history
[ Upstream commit 59ac325 ]

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

Fixes: 78b5713 ("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>
  • Loading branch information
Michal Swiatkowski authored and gregkh committed Sep 15, 2022
1 parent 8527c9a commit 3e245b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/intel/ice/ice_main.c
Expand Up @@ -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;
}
Expand Down

0 comments on commit 3e245b0

Please sign in to comment.