Commit 15a7deb8 authored by Scott Branden's avatar Scott Branden Committed by David S. Miller
Browse files

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: default avatarEdwin Peer <edwin.peer@broadcom.com>
Signed-off-by: default avatarScott Branden <scott.branden@broadcom.com>
Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a2f3835c
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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)