summaryrefslogtreecommitdiff
path: root/include/dm/read.h
diff options
context:
space:
mode:
authorStanislav Pinchuk <Stanislav.Pinchuk@kaspersky.com>2021-01-20 21:52:23 +0300
committerSimon Glass <sjg@chromium.org>2021-01-31 00:25:42 +0300
commita00e0f7ae5a3058dc8dd520d1d449d4c8806e5f8 (patch)
tree1f44f89f508c34a5fec8936b8f349978da28e6bf /include/dm/read.h
parent43db07507abdb54b6575345300c171b0486e46be (diff)
downloadu-boot-a00e0f7ae5a3058dc8dd520d1d449d4c8806e5f8.tar.xz
do not pass NULL pointer to libfdt
Re-send because of line-wraps. Without this patch, u-boot just hangs if the fdt pointer is not initialized. The diagnostic subsystems are not yet initialized, so all you get is a blind hang. Signed-off-by: Stanislav.Pinchuk@kaspersky.com
Diffstat (limited to 'include/dm/read.h')
-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);
}