Thread (2 messages) flat view 2 messages, 2 authors, 2014-02-21

[PATCH] arm: removed compiler warning

From: Gregory CLEMENT <hidden>
Date: 2014-02-21 08:40:40
Also in: lkml

On 17/02/2014 05:38, John de la Garza wrote:
Removed this compiler warning for arch/arm/boot/compressed/atags_to_fdt.c.
The warning was: 'memsize' may be used uninitialized in this function.
Indeed it was an error, thanks to have fixed it.
Signed-off-by: John de la Garza <redacted>
Acked-by: Gregory CLEMENT <redacted>
quoted hunk ↗ jump to hunk
---
 arch/arm/boot/compressed/atags_to_fdt.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/arm/boot/compressed/atags_to_fdt.c b/arch/arm/boot/compressed/atags_to_fdt.c
index d1153c8..75b64da 100644
--- a/arch/arm/boot/compressed/atags_to_fdt.c
+++ b/arch/arm/boot/compressed/atags_to_fdt.c
@@ -110,7 +110,8 @@ int atags_to_fdt(void *atag_list, void *fdt, int total_space)
 	 * address and size for each bank */
 	uint32_t mem_reg_property[2 * 2 * NR_BANKS];
 	int memcount = 0;
-	int ret, memsize;
+	int memsize = 0;
+	int ret;
 
 	/* make sure we've got an aligned pointer */
 	if ((u32)atag_list & 0x3)

-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help