summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/fdtdec.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/fdtdec.c b/lib/fdtdec.c
index 915fe2444a..fa7da8963c 100644
--- a/lib/fdtdec.c
+++ b/lib/fdtdec.c
@@ -160,8 +160,10 @@ int fdtdec_get_pci_addr(const void *blob, int node, enum fdt_pci_space type,
}
}
- if (i == num)
+ if (i == num) {
+ ret = -ENXIO;
goto fail;
+ }
return 0;
} else {