diff options
author | Michael Chan <michael.chan@broadcom.com> | 2020-03-22 16:40:04 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-03-23 21:42:48 -0700 |
commit | 62bfb932a51f6d08eb409248e69f8d6428c2cabd (patch) | |
tree | 591fcfa32adbaa14716f6f87771942fa5663ca8c /drivers/net/ethernet/broadcom/bnxt | |
parent | 0b5b561cea32d5bb1e0a82d65b755a3cb5212141 (diff) | |
download | linux-62bfb932a51f6d08eb409248e69f8d6428c2cabd.tar.bz2 |
bnxt_en: Free context memory after disabling PCI in probe error path.
Other shutdown code paths will always disable PCI first to shutdown DMA
before freeing context memory. Do the same sequence in the error path
of probe to be safe and consistent.
Fixes: c20dc142dd7b ("bnxt_en: Disable bus master during PCI shutdown and driver unload.")
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom/bnxt')
-rw-r--r-- | drivers/net/ethernet/broadcom/bnxt/bnxt.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index 0628a6abcc3e..95f4c02aa7e1 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -11970,12 +11970,12 @@ init_err_pci_clean: bnxt_hwrm_func_drv_unrgtr(bp); bnxt_free_hwrm_short_cmd_req(bp); bnxt_free_hwrm_resources(bp); - bnxt_free_ctx_mem(bp); - kfree(bp->ctx); - bp->ctx = NULL; kfree(bp->fw_health); bp->fw_health = NULL; bnxt_cleanup_pci(bp); + bnxt_free_ctx_mem(bp); + kfree(bp->ctx); + bp->ctx = NULL; init_err_free: free_netdev(dev); |