Skip to contentSkip to conversation

sparc32: fix warning in floopy glue

PATCH In review Sam Ravnborg 1 participant 1 message May 12, 2012 SPARC + UltraSPARC (sparc/sparc64)

lore
Share & tools
lore
#0 lore raw

PATCH 1/5 sparc32: fix warning in floopy glue

Fix following warning:
arch/sparc/include/asm/floppy_32.h:342:5: warning: 'op' may be used uninitialized in this function

The warning are legitimite and we can end up using op uninitialized. This fixes build with my gcc on UP.

---
 arch/sparc/include/asm/floppy_32.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
arch/sparc/include/asm/floppy_32.h +1 -0
index f954856..491eb68 100644
@@ -334,6 +334,7 @@ static int sun_floppy_init(void)
 	/* Look up irq in platform_device.
 	 * We try "SUNW,fdtwo" and "fd"
 	 */
+	op = NULL;
 	for_each_node_by_name(dp, "SUNW,fdtwo") {
 		op = of_find_device_by_node(dp);
 		if (op)
Signature · 1 line
1.6.0.6