All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] handle all fdt_get_phandle_errors
@ 2018-05-04 18:37 Jonathan Marler
  2018-05-14 15:56 ` Stefan Hajnoczi
  2018-05-14 15:56 ` Peter Maydell
  0 siblings, 2 replies; 4+ messages in thread
From: Jonathan Marler @ 2018-05-04 18:37 UTC (permalink / raw)
  To: crosthwaite.peter, agraf, qemu-devel; +Cc: qemu-trivial

Signed-off-by: Jonathan Marler <johnnymarler@gmail.com>
---
 device_tree.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/device_tree.c b/device_tree.c
index 52c3358..2b75905 100644
--- a/device_tree.c
+++ b/device_tree.c
@@ -379,8 +379,12 @@ uint32_t qemu_fdt_get_phandle(void *fdt, const char
*path)

     r = fdt_get_phandle(fdt, findnode_nofail(fdt, path));
     if (r == 0) {
-        error_report("%s: Couldn't get phandle for %s: %s", __func__,
-                     path, fdt_strerror(r));
+        error_report("%s: Node %s does not have a 'phandle'", __func__,
+                     path);
+        exit(1);
+    }
+    if (r == -1) {
+        error_report("%s: Couldn't get phandle for %s", __func__, path);
         exit(1);
     }

-- 
2.1.4

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

end of thread, other threads:[~2018-06-13 10:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-04 18:37 [Qemu-devel] [PATCH] handle all fdt_get_phandle_errors Jonathan Marler
2018-05-14 15:56 ` Stefan Hajnoczi
2018-05-14 15:56 ` Peter Maydell
2018-06-13 10:34   ` David Gibson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.