summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYe Li <ye.li@nxp.com>2016-03-02 01:00:05 +0800
committerguoyin.chen <guoyin.chen@freescale.com>2016-03-04 15:53:41 +0800
commit22338e28ca0033491073b16e811f388ae232ab31 (patch)
treeb01dd4e814cc686cf5bbe6f13ddb5ba668c836e7
parent05f477fa301b1c8e1b48d9411c5836c314fe59ac (diff)
downloadu-boot-imx-22338e28ca0033491073b16e811f388ae232ab31.zip
u-boot-imx-22338e28ca0033491073b16e811f388ae232ab31.tar.gz
u-boot-imx-22338e28ca0033491073b16e811f388ae232ab31.tar.bz2
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> (cherry picked from commit 00667ac75d28fc580b8bcb5db356a7c75f44f02c)
-rw-r--r--common/image-fdt.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/common/image-fdt.c b/common/image-fdt.c
index c306794..04de749 100644
--- a/common/image-fdt.c
+++ b/common/image-fdt.c
@@ -514,7 +514,8 @@ int image_setup_libfdt(bootm_headers_t *images, void *blob,
}
}
if (IMAGE_OF_SYSTEM_SETUP) {
- if (ft_system_setup(blob, gd->bd)) {
+ fdt_ret = ft_system_setup(blob, gd->bd);
+ if (fdt_ret) {
printf("ERROR: system-specific fdt fixup failed: %s\n",
fdt_strerror(fdt_ret));
goto err;