diff options
-rw-r--r-- | drivers/tty/serial/8250.c | 4 | ||||
-rw-r--r-- | include/linux/serial_core.h | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/drivers/tty/serial/8250.c b/drivers/tty/serial/8250.c index 90dad17e38c..6748568f730 100644 --- a/drivers/tty/serial/8250.c +++ b/drivers/tty/serial/8250.c @@ -2695,7 +2695,7 @@ serial8250_verify_port(struct uart_port *port, struct serial_struct *ser) if (ser->irq >= nr_irqs || ser->irq < 0 || ser->baud_base < 9600 || ser->type < PORT_UNKNOWN || ser->type >= ARRAY_SIZE(uart_config) || ser->type == PORT_CIRRUS || - ser->type == PORT_STARTECH) + ser->type == PORT_STARTECH || uart_config[ser->type].name == NULL) return -EINVAL; return 0; } @@ -2705,7 +2705,7 @@ serial8250_type(struct uart_port *port) { int type = port->type; - if (type >= ARRAY_SIZE(uart_config)) + if (type >= ARRAY_SIZE(uart_config) || uart_config[type].name == NULL) type = 0; return uart_config[type].name; } diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index 8bec265c5a2..bae516e39a5 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h @@ -47,8 +47,8 @@ #define PORT_U6_16550A 19 /* ST-Ericsson U6xxx internal UART */ #define PORT_TEGRA 20 /* NVIDIA Tegra internal UART */ #define PORT_XR17D15X 21 /* Exar XR17D15x UART */ -#define PORT_BRCM_TRUMANAGE 22 -#define PORT_MAX_8250 22 /* max port ID */ +#define PORT_BRCM_TRUMANAGE 25 +#define PORT_MAX_8250 25 /* max port ID */ /* * ARM specific type numbers. These are not currently guaranteed |