spl: atf: Add missing ndepth initialization
ndepth needs to be initialized before it is used in fdt_next_node().
Uninitialized value is causing that node is found and depth increase but
won't pass condition below because initial state wasn't setup.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
diff --git a/common/spl/spl_atf.c b/common/spl/spl_atf.c
index df29274..24fd35e 100644
--- a/common/spl/spl_atf.c
+++ b/common/spl/spl_atf.c
@@ -112,7 +112,7 @@
static int spl_fit_images_find(void *blob, int os)
{
- int parent, node, ndepth;
+ int parent, node, ndepth = 0;
const void *data;
if (!blob)