aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/bcm47xx/serial.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/mips/bcm47xx/serial.c b/arch/mips/bcm47xx/serial.c
index b8ef965705cf..2f5bbd68e9a0 100644
--- a/arch/mips/bcm47xx/serial.c
+++ b/arch/mips/bcm47xx/serial.c
@@ -31,7 +31,8 @@ static int __init uart8250_init_ssb(void)
31 31
32 memset(&uart8250_data, 0, sizeof(uart8250_data)); 32 memset(&uart8250_data, 0, sizeof(uart8250_data));
33 33
34 for (i = 0; i < mcore->nr_serial_ports; i++) { 34 for (i = 0; i < mcore->nr_serial_ports &&
35 i < ARRAY_SIZE(uart8250_data) - 1; i++) {
35 struct plat_serial8250_port *p = &(uart8250_data[i]); 36 struct plat_serial8250_port *p = &(uart8250_data[i]);
36 struct ssb_serial_port *ssb_port = &(mcore->serial_ports[i]); 37 struct ssb_serial_port *ssb_port = &(mcore->serial_ports[i]);
37 38
@@ -55,7 +56,8 @@ static int __init uart8250_init_bcma(void)
55 56
56 memset(&uart8250_data, 0, sizeof(uart8250_data)); 57 memset(&uart8250_data, 0, sizeof(uart8250_data));
57 58
58 for (i = 0; i < cc->nr_serial_ports; i++) { 59 for (i = 0; i < cc->nr_serial_ports &&
60 i < ARRAY_SIZE(uart8250_data) - 1; i++) {
59 struct plat_serial8250_port *p = &(uart8250_data[i]); 61 struct plat_serial8250_port *p = &(uart8250_data[i]);
60 struct bcma_serial_port *bcma_port; 62 struct bcma_serial_port *bcma_port;
61 bcma_port = &(cc->serial_ports[i]); 63 bcma_port = &(cc->serial_ports[i]);