]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
stm32mp: fix board_get_alt_info_mmc()
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Tue, 11 Jan 2022 14:58:08 +0000 (15:58 +0100)
committerPatrice Chotard <patrice.chotard@foss.st.com>
Mon, 24 Jan 2022 09:59:28 +0000 (10:59 +0100)
MAX_SEARCH_PARTITIONS is the highest possible partition number.
Do not skip the last partition in board_get_alt_info_mmc().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
board/st/common/stm32mp_dfu.c

index a3f0da5b5b867afd2bef1951c9d6f6f6e7a8ba28..fa48b2a35ee672837351d90ced22b2707650b2d1 100644 (file)
@@ -57,7 +57,7 @@ static void board_get_alt_info_mmc(struct udevice *dev, char *buf)
                first = false;
        }
 
-       for (p = 1; p < MAX_SEARCH_PARTITIONS; p++) {
+       for (p = 1; p <= MAX_SEARCH_PARTITIONS; p++) {
                if (part_get_info(desc, p, &info))
                        continue;
                if (!first)