serial: apbuart: Fixup apbuart_console_init()
authorThomas Gleixner <tglx@linutronix.de>
Fri, 17 Dec 2010 10:16:17 +0000 (11:16 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 6 Jan 2011 18:44:11 +0000 (10:44 -0800)
commit 35c64e5d (drivers: serial: apbuart: Handle OF failures
gracefully) missed that the modified grlib_apbuart_configure()
function is called from apbuart_console_init() as well.

Fix the fallout.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/serial/apbuart.c

index 2e84d9c3d41939686fe6876504e74a1dacbeb7a2..a30bb9620c9b3b9d39695b71305fb8b70d13a0c3 100644 (file)
@@ -520,11 +520,12 @@ static struct console grlib_apbuart_console = {
 };
 
 
-static void grlib_apbuart_configure(void);
+static int grlib_apbuart_configure(void);
 
 static int __init apbuart_console_init(void)
 {
-       grlib_apbuart_configure();
+       if (grlib_apbuart_configure())
+               return -ENODEV;
        register_console(&grlib_apbuart_console);
        return 0;
 }