David Gibson 46743c412d libfdt: Correct fdt handling of overlays without fixups and base trees without symbols
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 <david@gibson.dropbear.id.au>
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Simon Glass <sjg@chromium.org>
2017-01-13 18:19:45 -07:00
..
2016-02-06 12:00:59 +01:00
2016-01-19 08:31:21 -05:00
2011-01-18 23:38:08 +01:00
2016-04-11 20:48:26 -04:00
2010-09-19 19:29:47 +02:00
2016-05-02 18:37:09 -04:00
2016-10-19 09:01:52 +02:00
2014-10-25 07:02:01 -04:00
2012-04-29 14:14:08 +02:00
2015-07-21 17:39:28 -06:00
2016-11-21 14:07:30 -05:00
2016-10-19 09:01:53 +02:00
2016-06-06 13:39:18 -04:00
2016-10-11 11:55:33 +08:00
2016-02-26 08:53:10 -07:00