summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmd/fdt.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/cmd/fdt.c b/cmd/fdt.c
index 31a536198c..05e19f8a72 100644
--- a/cmd/fdt.c
+++ b/cmd/fdt.c
@@ -284,6 +284,10 @@ static int do_fdt(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
len = 0;
} else {
ptmp = fdt_getprop(working_fdt, nodeoffset, prop, &len);
+ if (!ptmp) {
+ printf("prop (%s) not found!\n", prop);
+ return 1;
+ }
if (len > SCRATCHPAD) {
printf("prop (%d) doesn't fit in scratchpad!\n",
len);