From: Grant Likely Date: Wed, 28 Aug 2013 20:24:17 +0000 (+0100) Subject: of/fdt: Remove duplicate memory clearing on FDT unflattening X-Git-Tag: upstream/snapshot3+hdmi~4357^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=92d31610aac907c046f0e9c0f888c30415f20936;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git of/fdt: Remove duplicate memory clearing on FDT unflattening Patch 9e4012752, "of: fdt: fix memory initialization for expanded DT" fixed incomplete clearing of memory when unflattening the device tree. However the code was already clearing some of the memory, it just wasn't doing so for all allocations. Now that the memory is cleared right at the point of allocation, the memset after unflatten_dt_alloc() is redundant. Remove it. Signed-off-by: Grant Likely Acked-by: Wladislav Wiebe --- diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index d49b3e8..8263d2d 100644 --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c @@ -202,7 +202,6 @@ static unsigned long unflatten_dt_node(struct boot_param_header *blob, __alignof__(struct device_node)); if (allnextpp) { char *fn; - memset(np, 0, sizeof(*np)); np->full_name = fn = ((char *)np) + sizeof(*np); if (new_format) { /* rebuild full path for new format */