diff options
author | Somnath Kotur <somnath.kotur@broadcom.com> | 2021-06-18 08:07:27 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-06-18 21:00:27 +0200 |
commit | 03400aaa69f916a376e11526cf591901a96a3a5c (patch) | |
tree | f753c97bd022f5ff4842a25b0d8e66088c79c612 /drivers/net | |
parent | bnxt_en: Fix TQM fastpath ring backing store computation (diff) | |
download | linux-03400aaa69f916a376e11526cf591901a96a3a5c.tar.xz linux-03400aaa69f916a376e11526cf591901a96a3a5c.zip |
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: 7c3809181468 ("bnxt_en: Refactor bnxt_init_one() and turn on TPA support on 57500 chips.")
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/broadcom/bnxt/bnxt.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index c913cb1f2a72..aef3fccc27a9 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -13160,6 +13160,7 @@ init_err_pci_clean: bnxt_hwrm_func_drv_unrgtr(bp); bnxt_free_hwrm_short_cmd_req(bp); bnxt_free_hwrm_resources(bp); + bnxt_ethtool_free(bp); kfree(bp->fw_health); bp->fw_health = NULL; bnxt_cleanup_pci(bp); |