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 <ye.li@nxp.com>
(cherry picked from commit 1ae3d2d3859c5f2610c74cd192da2657e2600aff)
This commit is contained in:
Ye Li 2019-02-25 00:19:13 -08:00
parent 8246300186
commit 94c631a9c8
1 changed files with 1 additions and 1 deletions

View File

@ -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;