summaryrefslogtreecommitdiff
path: root/device_tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'device_tree.c')
-rw-r--r--device_tree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/device_tree.c b/device_tree.c
index 56af24b397..69be9da8e4 100644
--- a/device_tree.c
+++ b/device_tree.c
@@ -213,7 +213,7 @@ uint32_t qemu_devtree_get_phandle(void *fdt, const char *path)
uint32_t r;
r = fdt_get_phandle(fdt, findnode_nofail(fdt, path));
- if (r <= 0) {
+ if (r == 0) {
fprintf(stderr, "%s: Couldn't get phandle for %s: %s\n", __func__,
path, fdt_strerror(r));
exit(1);