1 --- a/arch/arm/mach-omap2/serial.c
2 +++ b/arch/arm/mach-omap2/serial.c
3 @@ -660,6 +660,8 @@ static void serial_out_override(struct u
7 +static struct omap_uart_state statebuf[4];
9 void __init omap_serial_early_init(void)
12 @@ -675,9 +677,9 @@ void __init omap_serial_early_init(void)
16 - uart = kzalloc(sizeof(struct omap_uart_state), GFP_KERNEL);
18 + if (WARN_ON(i >= ARRAY_SIZE(statebuf)))
20 + uart = &statebuf[i];