mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-22 20:38:03 +00:00
fix(allwinner): dtb: check for correct error condition
In sunxi_soc_fdt_fixup(), we check for the value of "ret" again, after calling fdt_node_offset_by_phandle(), even though the error value of that lands in "node". Check for "node" being non-negative instead, to properly detect any errors here. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Change-Id: I57c1406388dbe11d343038da173019519e18af3e
This commit is contained in:
parent
4bcf5b847c
commit
7300a4d167
1 changed files with 1 additions and 1 deletions
|
@ -52,7 +52,7 @@ void sunxi_soc_fdt_fixup(void *dtb)
|
|||
}
|
||||
|
||||
node = fdt_node_offset_by_phandle(dtb, phandle);
|
||||
if (ret != 0) {
|
||||
if (node < 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue