9
0
Fork 0

of: fix merge mode in of_unflatten_dtb

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@pengutronix.de>
This commit is contained in:
Sascha Hauer 2013-08-13 16:47:40 +02:00
parent e60778e041
commit a5352dfb66
1 changed files with 1 additions and 0 deletions

View File

@ -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);