bnxt_en: Do driver unregister cleanup in bnxt_init_one() failure path.
authorVasundhara Volam <vasundhara-v.volam@broadcom.com>
Sun, 24 Nov 2019 03:30:40 +0000 (22:30 -0500)
committerJakub Kicinski <jakub.kicinski@netronome.com>
Sun, 24 Nov 2019 22:48:02 +0000 (14:48 -0800)
commitbdb3860236b3ec8bb0f55ddef6d62666a8b3b23e
treea63e567efb41f21ff065df099cd30ed946a27e5e
parentef02af8c8ece3d6fb01fe267c1c7622399bc34f6
bnxt_en: Do driver unregister cleanup in bnxt_init_one() failure path.

In the bnxt_init_one() failure path, if the driver has already called
firmware to register the driver, it is not undoing the driver
registration.  Add this missing step to unregister for correctness,
so that the firmware knows that the driver has unloaded.

Signed-off-by: Vasundhara Volam <vasundhara-v.volam@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
drivers/net/ethernet/broadcom/bnxt/bnxt.c
drivers/net/ethernet/broadcom/bnxt/bnxt.h