aboutsummaryrefslogtreecommitdiff
path: root/lib/utils
diff options
context:
space:
mode:
Diffstat (limited to 'lib/utils')
-rw-r--r--lib/utils/cache/fdt_cache.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/utils/cache/fdt_cache.c b/lib/utils/cache/fdt_cache.c
index aeaa6138..2a9e8a6d 100644
--- a/lib/utils/cache/fdt_cache.c
+++ b/lib/utils/cache/fdt_cache.c
@@ -23,7 +23,9 @@ int fdt_cache_add(const void *fdt, int noff, struct cache_device *dev)
sbi_dprintf("%s: %s\n", __func__, dev->name);
rc = fdt_next_cache_get(fdt, noff, &dev->next);
- if (rc)
+ if (rc == SBI_ENOENT)
+ dev->next = NULL;
+ else if (rc)
return rc;
return cache_add(dev);