]> git.baikalelectronics.ru Git - kernel.git/commit
bnxt_en: fix error path of FW reset
authorSomnath Kotur <somnath.kotur@broadcom.com>
Sun, 18 Jul 2021 19:36:29 +0000 (15:36 -0400)
committerDavid S. Miller <davem@davemloft.net>
Mon, 19 Jul 2021 15:25:44 +0000 (08:25 -0700)
commit3958b1da725a477b4a222183d16a14d85445d4b6
treec74c6774e72a7f1d04f0697286542eb3a0f77b67
parent6cd657cb3ee6f4de57e635b126ffbe0e51d00f1a
bnxt_en: fix error path of FW reset

When bnxt_open() fails in the firmware reset path, the driver needs to
gracefully abort, but it is executing code that should be invoked only
in the success path.  Define a function to abort FW reset and
consolidate all error paths to call this new function.

Fixes: dab62e7c2de7 ("bnxt_en: Implement faster recovery for firmware fatal error.")
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>
drivers/net/ethernet/broadcom/bnxt/bnxt.c