mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 23:24:38 +00:00
fdt: make fdt_get_base_address() return OF_BAD_ADDR when "reg" not found
Currently, fdt_get_base_address() returns 0 if the "reg" property is missing. Since 0 is a valid value, it is not suitable for the error handling. Return OF_BAD_ADDR instead. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
This commit is contained in:
parent
e2705fa9c5
commit
e3665ba9d7
1 changed files with 1 additions and 1 deletions
|
@ -1552,7 +1552,7 @@ u64 fdt_get_base_address(const void *fdt, int node)
|
||||||
|
|
||||||
prop = fdt_getprop(fdt, node, "reg", &size);
|
prop = fdt_getprop(fdt, node, "reg", &size);
|
||||||
|
|
||||||
return prop ? fdt_translate_address(fdt, node, prop) : 0;
|
return prop ? fdt_translate_address(fdt, node, prop) : OF_BAD_ADDR;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in a new issue