On 21 December 2016 at 03:58, Stefan Agner <[email protected]> wrote: > From: David Gibson <[email protected]> > > The fdt_overlay_apply() function purports to support the edge cases where > an overlay has no fixups to be applied, or a base tree which has no > symbols (the latter can only work if the former is also true). However it > gets it wrong in a couple of small ways: > > * In the no fixups case, it doesn't fail immediately, but will attempt > fdt_for_each_property_offset() giving -FDT_ERR_NOTFOUND as the node > offset, which will fail. Instead it should succeed immediately, since > there's nothing to do. > * In the case of no symbols, it again doesn't fail immediately. However > if there is an actual fixup it will fail with an unexpected error, > because -FDT_ERR_NOTFOUND is passed to fdt_getprop() when attempting to > look up the symbols. We should instead return -FDT_ERR_NOTFOUND > directly. > > Both of these errors lead to the code returning misleading error codes in > failing cases. > > [ DTC commit: 7d8ef6e1db9794f72805a0855f4f7f12fadd03d3 ] > > Signed-off-by: David Gibson <[email protected]> > Signed-off-by: Stefan Agner <[email protected]> > --- > > Changes in v2: > - Backported patch from libfdt > > lib/libfdt/fdt_overlay.c | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-)
Acked-by: Simon Glass <[email protected]> _______________________________________________ U-Boot mailing list [email protected] http://lists.denx.de/mailman/listinfo/u-boot

