diff options
author | Scott Branden <scott.branden@broadcom.com> | 2021-03-22 03:08:42 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-03-22 13:07:28 -0700 |
commit | 15a7deb895497e4c9496b98367e4a0671add03f1 (patch) | |
tree | eb37b2808f8d9fd443823848062af97129da9f71 /drivers/net/ethernet/broadcom | |
parent | a2f3835cc68a2222d0ab97862187ed98e65fe682 (diff) | |
download | linux-15a7deb895497e4c9496b98367e4a0671add03f1.tar.gz linux-15a7deb895497e4c9496b98367e4a0671add03f1.tar.bz2 linux-15a7deb895497e4c9496b98367e4a0671add03f1.zip |
bnxt_en: check return value of bnxt_hwrm_func_resc_qcaps
Check return value of call to bnxt_hwrm_func_resc_qcaps in
bnxt_hwrm_if_change and return failure on error.
Reviewed-by: Edwin Peer <edwin.peer@broadcom.com>
Signed-off-by: Scott Branden <scott.branden@broadcom.com>
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')
-rw-r--r-- | drivers/net/ethernet/broadcom/bnxt/bnxt.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index 3624e79667b6..7f40dd7d847d 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -9634,6 +9634,9 @@ static int bnxt_hwrm_if_change(struct bnxt *bp, bool up) struct bnxt_hw_resc *hw_resc = &bp->hw_resc; rc = bnxt_hwrm_func_resc_qcaps(bp, true); + if (rc) + netdev_err(bp->dev, "resc_qcaps failed\n"); + hw_resc->resv_cp_rings = 0; hw_resc->resv_stat_ctxs = 0; hw_resc->resv_irqs = 0; @@ -9647,7 +9650,7 @@ static int bnxt_hwrm_if_change(struct bnxt *bp, bool up) } } } - return 0; + return rc; } static int bnxt_hwrm_port_led_qcaps(struct bnxt *bp) |