[PATCH 1/5] sparc32: fix warning in floopy glue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

Signed-off-by: Sam Ravnborg <sam@xxxxxxxxxxxx>
 arch/sparc/include/asm/floppy_32.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/sparc/include/asm/floppy_32.h b/arch/sparc/include/asm/floppy_32.h
index f954856..491eb68 100644
--- a/arch/sparc/include/asm/floppy_32.h
+++ b/arch/sparc/include/asm/floppy_32.h
@@ -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)

To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Linux MIPS Home]     [Kernel Development]     [DCCP]     [Linux ARM Development]     [Linux]     [Photo]     [Yosemite News]     [MIPS Architecture]     [Linux ARM Kernel]     [Linux SCSI]     [Linux x86_64]     [Linux Hams]

  Powered by Linux