The LPCG number on iMX93 and iMX91 is 127 not 122. The wrong
value is used in ccm_reg structure and Coverity reports several
issues as out-of-bounds write.

Signed-off-by: Ye Li <ye...@nxp.com>
Reviewed-by: Peng Fan <peng....@nxp.com>
---
 arch/arm/include/asm/arch-imx9/clock.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/include/asm/arch-imx9/clock.h 
b/arch/arm/include/asm/arch-imx9/clock.h
index ffaf6b5f7d8..ddc84d2c9ed 100644
--- a/arch/arm/include/asm/arch-imx9/clock.h
+++ b/arch/arm/include/asm/arch-imx9/clock.h
@@ -111,7 +111,7 @@ struct ccm_reg {
        u32 reserved_3[192];
        struct ccm_lpcg_oscpll clk_oscplls[19]; /* 0x5000 */
        u32 reserved_4[2768];
-       struct ccm_lpcg_oscpll clk_lpcgs[122]; /* 0x8000 */
+       struct ccm_lpcg_oscpll clk_lpcgs[127]; /* 0x8000 */
 };
 
 struct ana_pll_reg_elem {
-- 
2.37.1

Reply via email to