diff options
author | Rhyland Klein <rklein@nvidia.com> | 2016-05-11 13:36:57 -0400 |
---|---|---|
committer | Rob Herring <robh@kernel.org> | 2016-05-19 09:15:14 -0500 |
commit | 78c44d910d3e5f96dc6b3695fc1e4efd7c46a455 (patch) | |
tree | 5d9a0e4a54adc0efcbe4319801707be6e2037458 /sound/mips/Makefile | |
parent | b9c43856f21d97ffdfdd642acf2eb0b52d3b1555 (diff) |
drivers/of: Fix depth when unflattening devicetree
When the implementation for unflatten_dt_node() changed from being
recursive to being non-recursive, it had a side effect of increasing the
depth passed to fdt_next_node() by 1. This is fine most of the time, but
it seems that when the end of the dtb is being parsed, it will cause the
FDT_END condition in fdt_next_node() to return a different value
(returning nextoffset instead of -FDT_ERR_NOTFOUND). This ends up passing
an FDT_ERR_TRUNCATED error back to the unflatten_dt_node() which then
sees that and complains "Error -8 processing FDT" causing boot to fail.
This patch simply avoids incrementing depth and uses modified accesses
for local array indices so that the depth is the same as it was before
the change as far as fdt_next_node() is concerned.
This problem was discovered trying to boot Tegra210-Smaug platforms.
Fixes: 50800082f176 ("drivers/of: Avoid recursively calling unflatten_dt_node()")
Signed-off-by: Rhyland Klein <rklein@nvidia.com>
[robh: squashed in KASAN fix from Rhyland]
Signed-off-by: Rob Herring <robh@kernel.org>
Diffstat (limited to 'sound/mips/Makefile')
0 files changed, 0 insertions, 0 deletions