summaryrefslogtreecommitdiffstats
path: root/scripts/dtc/libfdt/fdt_rw.c
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/dtc/libfdt/fdt_rw.c')
-rw-r--r--scripts/dtc/libfdt/fdt_rw.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/dtc/libfdt/fdt_rw.c b/scripts/dtc/libfdt/fdt_rw.c
index 2eed4f58387c..3fd5847377c9 100644
--- a/scripts/dtc/libfdt/fdt_rw.c
+++ b/scripts/dtc/libfdt/fdt_rw.c
@@ -283,7 +283,8 @@ int fdt_setprop(void *fdt, int nodeoffset, const char *name,
if (err)
return err;
- memcpy(prop->data, val, len);
+ if (len)
+ memcpy(prop->data, val, len);
return 0;
}