U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/2] libfdt: overlay: Fix missing symbols condition
@ 2016-12-15 23:03 Stefan Agner
  2016-12-15 23:03 ` [U-Boot] [PATCH 2/2] cmd: fdt: Print error message when fdt application fails Stefan Agner
  2016-12-16  9:32 ` [U-Boot] [PATCH 1/2] libfdt: overlay: Fix missing symbols condition Maxime Ripard
  0 siblings, 2 replies; 8+ messages in thread
From: Stefan Agner @ 2016-12-15 23:03 UTC (permalink / raw)
  To: u-boot

From: Stefan Agner <stefan.agner@toradex.com>

When there is no symbols section in the device tree,
overlay_fixup_phandles should return FDT_ERR_NOTFOUND instead of
FDT_ERR_BADOFFSET.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
---

 lib/libfdt/fdt_overlay.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/libfdt/fdt_overlay.c b/lib/libfdt/fdt_overlay.c
index bb41404..4a9ba40 100644
--- a/lib/libfdt/fdt_overlay.c
+++ b/lib/libfdt/fdt_overlay.c
@@ -495,9 +495,9 @@ static int overlay_fixup_phandles(void *fdt, void *fdto)
 	if ((fixups_off < 0 && (fixups_off != -FDT_ERR_NOTFOUND)))
 		return fixups_off;
 
-	/* And base DTs without symbols */
+	/* But if we need to fixup phandles, symbols are required */
 	symbols_off = fdt_path_offset(fdt, "/__symbols__");
-	if ((symbols_off < 0 && (symbols_off != -FDT_ERR_NOTFOUND)))
+	if (symbols_off < 0)
 		return symbols_off;
 
 	fdt_for_each_property_offset(property, fdto, fixups_off) {
-- 
2.10.2

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-01-14 17:14 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-15 23:03 [U-Boot] [PATCH 1/2] libfdt: overlay: Fix missing symbols condition Stefan Agner
2016-12-15 23:03 ` [U-Boot] [PATCH 2/2] cmd: fdt: Print error message when fdt application fails Stefan Agner
2016-12-16  9:33   ` Maxime Ripard
2016-12-17 22:48     ` Simon Glass
2017-01-14 17:14       ` Simon Glass
2016-12-16  9:32 ` [U-Boot] [PATCH 1/2] libfdt: overlay: Fix missing symbols condition Maxime Ripard
2016-12-18  0:56   ` Stefan Agner
2016-12-19 13:19     ` Maxime Ripard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox