Skip to content

Commit

Permalink
bnxt_en: check return value of bnxt_hwrm_func_resc_qcaps
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Scott Branden <[email protected]>
Signed-off-by: Michael Chan <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
sbranden authored and davem330 committed Mar 22, 2021
1 parent a2f3835 commit 15a7deb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/net/ethernet/broadcom/bnxt/bnxt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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)
Expand Down

0 comments on commit 15a7deb

Please sign in to comment.