From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:6f8:1178:4:290:27ff:fe1d:cc33]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1V9WBI-0008Md-MU for barebox@lists.infradead.org; Wed, 14 Aug 2013 08:11:52 +0000 From: Sascha Hauer Date: Wed, 14 Aug 2013 10:11:19 +0200 Message-Id: <1376467885-29489-2-git-send-email-s.hauer@pengutronix.de> In-Reply-To: <1376467885-29489-1-git-send-email-s.hauer@pengutronix.de> References: <1376467885-29489-1-git-send-email-s.hauer@pengutronix.de> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH 1/7] of: fix merge mode in of_unflatten_dtb To: barebox@lists.infradead.org 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 --- 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 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox