[PATCH] powerpc: legacy_serial loop cleanup
Benjamin Herrenschmidt
benh at kernel.crashing.org
Sat Mar 25 23:44:32 EST 2006
> +static void __init setup_legacy_serial_console(int console)
> +{
> + if (console >= 0) {
> + struct legacy_serial_info *info =
> + &legacy_serial_infos[legacy_serial_console];
> + void __iomem *addr;
> +
> + if (info->taddr == 0)
> + return;
> + addr = ioremap(info->taddr, 0x1000);
> + if (addr == NULL)
> + return;
> + if (info->speed == 0)
> + info->speed = udbg_probe_uart_speed(addr, info->clock);
> + DBG("default console speed = %d\n", info->speed);
> + udbg_init_uart(addr, info->speed, info->clock);
> + }
> + return;
Hrm... What is the point of having a function ending with return; ?
What about, instead, something like:
if (consoles < 0)
return;
do shit ...
Ben.
More information about the Linuxppc-dev
mailing list