board: lx2160a: Correct board fixup for PCIe nodes
authorVikas Singh <vikas.singh@nxp.com>
Wed, 12 Feb 2020 08:17:09 +0000 (13:47 +0530)
committerPriyanka Jain <priyanka.jain@nxp.com>
Mon, 30 Mar 2020 02:36:51 +0000 (08:06 +0530)
Update "board_fix_fdt" with correct counter value "i".
This will fix the issue while fetching the "reg_names"
resource from fdt after fixup.

Signed-off-by: Vikas Singh <vikas.singh@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
board/freescale/lx2160a/lx2160a.c

index 103b0cc65916e7a9003bedef3f42c45d69197d75..cdacbbd43ba49648ecfda224be40036aa8d3bd6b 100644 (file)
@@ -149,6 +149,7 @@ int board_fix_fdt(void *fdt)
 
                reg_name = reg_names;
                remaining_names_len = names_len - (reg_name - reg_names);
+               i = 0;
                while ((i < ARRAY_SIZE(reg_names_map)) && remaining_names_len) {
                        old_name_len = strlen(reg_names_map[i].old_str);
                        new_name_len = strlen(reg_names_map[i].new_str);