mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-09-26 16:21:25 +02:00
tdx-cfg-block: fix off by one issue
Fix toradex_modules array off by one issue potentially leading to spurious printout during boot e.g. Model: Toradex V1.2A, instead of Model: Toradex UNKNOWN MODULE V1.2A. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Acked-by: Max Krummenacher <max.krummenacher@toradex.com> Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
This commit is contained in:
parent
43bfc49992
commit
ccdd37130b
@ -261,7 +261,7 @@ int read_tdx_cfg_block(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Cap product id to avoid issues with a yet unknown one */
|
/* Cap product id to avoid issues with a yet unknown one */
|
||||||
if (tdx_hw_tag.prodid > (sizeof(toradex_modules) /
|
if (tdx_hw_tag.prodid >= (sizeof(toradex_modules) /
|
||||||
sizeof(toradex_modules[0])))
|
sizeof(toradex_modules[0])))
|
||||||
tdx_hw_tag.prodid = 0;
|
tdx_hw_tag.prodid = 0;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user