bnxt_en: Free context memory after disabling PCI in probe error path.
authorMichael Chan <michael.chan@broadcom.com>
Sun, 22 Mar 2020 20:40:04 +0000 (16:40 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 1 Apr 2020 09:01:44 +0000 (11:01 +0200)
commit0234e8ebb7f40a99768b74e4657ad32720107e37
tree3fbe4ee1a1500718225286c0996453b7cfba28c8
parent797d6f91c3993f2dc26372af01c91a29048ec3b3
bnxt_en: Free context memory after disabling PCI in probe error path.

[ Upstream commit 62bfb932a51f6d08eb409248e69f8d6428c2cabd ]

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/broadcom/bnxt/bnxt.c