From 94c631a9c8254aa71b25fe0ce3e754773b349413 Mon Sep 17 00:00:00 2001 From: Ye Li Date: Mon, 25 Feb 2019 00:19:13 -0800 Subject: [PATCH] MLK-20978 imx8: Fix uninitialized variable in kernel DTB updating When using fdt_next_node, the depth variable needs being initialized first, otherwise we many get undefined depth. Signed-off-by: Ye Li (cherry picked from commit 1ae3d2d3859c5f2610c74cd192da2657e2600aff) --- arch/arm/mach-imx/imx8/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-imx/imx8/cpu.c b/arch/arm/mach-imx/imx8/cpu.c index abb6dc790d..3834cb61fb 100644 --- a/arch/arm/mach-imx/imx8/cpu.c +++ b/arch/arm/mach-imx/imx8/cpu.c @@ -1196,7 +1196,7 @@ static void update_fdt_with_owned_resources(void *blob) */ int offset = 0, next_off; - int depth, next_depth; + int depth = 0, next_depth; unsigned int rsrc_id; int rc;