From 99958187b6e807884dfa2989337bc2baa50bec6a Mon Sep 17 00:00:00 2001 From: Wolfgang Grandegger Date: Sat, 17 Jul 2010 16:38:48 +0200 Subject: [PATCH] --- yaml --- r: 201292 b: refs/heads/master c: 0d5977d652fa5fd4e9a56127b109e5e28d4db95d h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/mips/alchemy/common/platform.c | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index b3e8c71dfe2e..89e773695b5e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 7f13f65e61f1deed77c5c335ed0fa4d08f69e608 +refs/heads/master: 0d5977d652fa5fd4e9a56127b109e5e28d4db95d diff --git a/trunk/arch/mips/alchemy/common/platform.c b/trunk/arch/mips/alchemy/common/platform.c index 2580e77624d2..f9e5622ebc95 100644 --- a/trunk/arch/mips/alchemy/common/platform.c +++ b/trunk/arch/mips/alchemy/common/platform.c @@ -435,20 +435,21 @@ static struct platform_device *au1xxx_platform_devices[] __initdata = { static int __init au1xxx_platform_init(void) { unsigned int uartclk = get_au1x00_uart_baud_base() * 16; - int i; + int err, i; /* Fill up uartclk. */ for (i = 0; au1x00_uart_data[i].flags; i++) au1x00_uart_data[i].uartclk = uartclk; + err = platform_add_devices(au1xxx_platform_devices, + ARRAY_SIZE(au1xxx_platform_devices)); #ifndef CONFIG_SOC_AU1100 /* Register second MAC if enabled in pinfunc */ - if (!(au_readl(SYS_PINFUNC) & (u32)SYS_PF_NI2)) + if (!err && !(au_readl(SYS_PINFUNC) & (u32)SYS_PF_NI2)) platform_device_register(&au1xxx_eth1_device); #endif - return platform_add_devices(au1xxx_platform_devices, - ARRAY_SIZE(au1xxx_platform_devices)); + return err; } arch_initcall(au1xxx_platform_init);