[PATCH] ARM: omap: xload: Fix func uninitialized warning

Sascha Hauer s.hauer at pengutronix.de
Sun Jul 12 23:34:16 PDT 2015


When doing USB boot without having it enabled in the config func is used
unitialized. Explicitly set this to NULL so that booting fails in this case.

Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 arch/arm/mach-omap/xload.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/mach-omap/xload.c b/arch/arm/mach-omap/xload.c
index 4a0714e..a013717 100644
--- a/arch/arm/mach-omap/xload.c
+++ b/arch/arm/mach-omap/xload.c
@@ -293,6 +293,7 @@ static __noreturn int omap_xload(void)
 			func = omap4_xload_boot_usb();
 		} else {
 			printf("booting from USB not enabled\n");
+			func = NULL;
 		}
 		break;
 	case BOOTSOURCE_NAND:
-- 
2.1.4




More information about the barebox mailing list