Commit f5002ba4f61dbdbcb39a098a1e663ea8905048de

Authored by Ye Li
Committed by guoyin.chen
1 parent 380ba3fe91

MLK-12483-2 common: Fix uninitialized return value in image_fdt

When using ft_system_setup, the return value fdt_ret is not assigned,
so the fdt_strerror(fdt_ret) uses a uninitialized value.

Signed-off-by: Ye Li <ye.li@nxp.com>

Showing 1 changed file with 2 additions and 1 deletions Side-by-side Diff

... ... @@ -514,7 +514,8 @@
514 514 }
515 515 }
516 516 if (IMAGE_OF_SYSTEM_SETUP) {
517   - if (ft_system_setup(blob, gd->bd)) {
  517 + fdt_ret = ft_system_setup(blob, gd->bd);
  518 + if (fdt_ret) {
518 519 printf("ERROR: system-specific fdt fixup failed: %s\n",
519 520 fdt_strerror(fdt_ret));
520 521 goto err;