[PATCH 1/7] of: fix merge mode in of_unflatten_dtb
Sascha Hauer
s.hauer at pengutronix.de
Wed Aug 14 04:11:19 EDT 2013
In merge mode a property may be overwritte with new values. When
this happens the length has to be adjusted.
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
drivers/of/fdt.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index 76d6bb1..8481cf7 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -185,6 +185,7 @@ struct device_node *of_unflatten_dtb(struct device_node *root, void *infdt)
if (merge && p) {
free(p->value);
p->value = xzalloc(len);
+ p->length = len;
memcpy(p->value, nodep, len);
} else {
of_new_property(node, name, nodep, len);
--
1.8.4.rc2
More information about the barebox
mailing list