summaryrefslogtreecommitdiff
path: root/cmd/fdt.c
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/fdt.c')
-rw-r--r--cmd/fdt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/fdt.c b/cmd/fdt.c
index e55102a18d..31a536198c 100644
--- a/cmd/fdt.c
+++ b/cmd/fdt.c
@@ -380,7 +380,7 @@ static int do_fdt(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
/* no property value */
setenv(var, "");
return 0;
- } else if (len > 0) {
+ } else if (nodep && len > 0) {
if (subcmd[0] == 'v') {
int ret;
@@ -975,7 +975,7 @@ static int fdt_print(const char *pathp, char *prop, int depth)
/* no property value */
printf("%s %s\n", pathp, prop);
return 0;
- } else if (len > 0) {
+ } else if (nodep && len > 0) {
printf("%s = ", prop);
print_data (nodep, len);
printf("\n");