From 507064b835df517723bdc2e06c47322c3d626bf4 Mon Sep 17 00:00:00 2001 From: Raul E Rangel Date: Fri, 11 Feb 2022 09:48:58 -0700 Subject: soc/amd/cezanne/psp_verstage/uart: Fix off by 1 error FCH_UART_ID_MAX == 2, and there are 2 UARTS, so we don't need the -1. BUG=b:215599230 TEST=Build guybrush Found-by: Coverity CID 1469611 Signed-off-by: Raul E Rangel Change-Id: I5f0171ed2d3da7f86ba3cfd0457f60d2d5722625 Reviewed-on: https://review.coreboot.org/c/coreboot/+/61869 Reviewed-by: Felix Held Tested-by: build bot (Jenkins) --- src/soc/amd/cezanne/psp_verstage/uart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/soc/amd/cezanne/psp_verstage/uart.c b/src/soc/amd/cezanne/psp_verstage/uart.c index 0f0baba07e..5a45cb0545 100644 --- a/src/soc/amd/cezanne/psp_verstage/uart.c +++ b/src/soc/amd/cezanne/psp_verstage/uart.c @@ -4,7 +4,7 @@ #include #include -static void *uart_bars[FCH_UART_ID_MAX - 1]; +static void *uart_bars[FCH_UART_ID_MAX]; uintptr_t get_uart_base(unsigned int idx) { -- cgit v1.2.3