aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/dm/read.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/dm/read.h b/include/dm/read.h
index f6f8b875d1..03ba98232a 100644
--- a/include/dm/read.h
+++ b/include/dm/read.h
@@ -1006,7 +1006,7 @@ static inline u64 dev_translate_dma_address(const struct udevice *dev,
static inline int dev_read_alias_highest_id(const char *stem)
{
- if (!CONFIG_IS_ENABLED(OF_LIBFDT))
+ if (!CONFIG_IS_ENABLED(OF_LIBFDT) || !gd->fdt_blob)
return -1;
return fdtdec_get_alias_highest_id(gd->fdt_blob, stem);
}