]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - arch/powerpc/cpu/mpc85xx/mpc8569_serdes.c
powerpc: mpc85xx/mpc86xx: Fix off-by-one boundary checking with ARRAY_SIZE
[karo-tx-uboot.git] / arch / powerpc / cpu / mpc85xx / mpc8569_serdes.c
index f480c2609d6b629ac4a8e1cc2a1003ef3582cea9..7af6aff25957ee94639d15cb325e6277ec0f9a1b 100644 (file)
@@ -62,7 +62,7 @@ void fsl_serdes_init(void)
 
        debug("PORDEVSR[IO_SEL_SRDS] = %x\n", srds_cfg);
 
-       if (srds_cfg > ARRAY_SIZE(serdes1_cfg_tbl)) {
+       if (srds_cfg >= ARRAY_SIZE(serdes1_cfg_tbl)) {
                printf("Invalid PORDEVSR[IO_SEL_SRDS] = %d\n", srds_cfg);
                return;
        }