bnxt_en: Return error if bnxt_alloc_ctx_mem() fails.
authorMichael Chan <michael.chan@broadcom.com>
Sun, 22 Mar 2020 20:40:03 +0000 (16:40 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 1 Apr 2020 09:01:43 +0000 (11:01 +0200)
commit797d6f91c3993f2dc26372af01c91a29048ec3b3
treed1097d2d6f2f080b702908e7464587be9160019d
parentae4565168af39737d9306d74dd261fbcb032739e
bnxt_en: Return error if bnxt_alloc_ctx_mem() fails.

[ Upstream commit 0b5b561cea32d5bb1e0a82d65b755a3cb5212141 ]

The current code ignores the return value from
bnxt_hwrm_func_backing_store_cfg(), causing the driver to proceed in
the init path even when this vital firmware call has failed.  Fix it
by propagating the error code to the caller.

Fixes: 1b9394e5a2ad ("bnxt_en: Configure context memory on new devices.")
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