Skip to content

Commit 03400aa

Browse files
skotur-brcmdavem330
authored andcommitted
bnxt_en: Call bnxt_ethtool_free() in bnxt_init_one() error path
bnxt_ethtool_init() may have allocated some memory and we need to call bnxt_ethtool_free() to properly unwind if bnxt_init_one() fails. Fixes: 7c38091 ("bnxt_en: Refactor bnxt_init_one() and turn on TPA support on 57500 chips.") Signed-off-by: Somnath Kotur <[email protected]> Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent c12e164 commit 03400aa

File tree

1 file changed

+1
-0
lines changed
  • drivers/net/ethernet/broadcom/bnxt

1 file changed

+1
-0
lines changed

drivers/net/ethernet/broadcom/bnxt/bnxt.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13160,6 +13160,7 @@ static int bnxt_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
1316013160
bnxt_hwrm_func_drv_unrgtr(bp);
1316113161
bnxt_free_hwrm_short_cmd_req(bp);
1316213162
bnxt_free_hwrm_resources(bp);
13163+
bnxt_ethtool_free(bp);
1316313164
kfree(bp->fw_health);
1316413165
bp->fw_health = NULL;
1316513166
bnxt_cleanup_pci(bp);

0 commit comments

Comments
 (0)