projects
/
linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dc08459
)
serial: 8250: Don't crash when nr_uarts is 0
author
Phil Elwell
<phil@raspberrypi.org>
Tue, 30 Jun 2015 13:12:42 +0000
(14:12 +0100)
committer
popcornmix
<popcornmix@gmail.com>
Mon, 20 Feb 2017 12:17:37 +0000
(12:17 +0000)
drivers/tty/serial/8250/8250_core.c
patch
|
blob
|
history
diff --git
a/drivers/tty/serial/8250/8250_core.c
b/drivers/tty/serial/8250/8250_core.c
index e8819aa20415603c80547e382838a8fa3ce54792..cf9c7d2e3f95e1a19410247a89c2e49c1a2747a8 100644
(file)
--- a/
drivers/tty/serial/8250/8250_core.c
+++ b/
drivers/tty/serial/8250/8250_core.c
@@
-509,6
+509,8
@@
static void __init serial8250_isa_init_ports(void)
if (nr_uarts > UART_NR)
nr_uarts = UART_NR;
+ if (!nr_uarts)
+ return;
for (i = 0; i < nr_uarts; i++) {
struct uart_8250_port *up = &serial8250_ports[i];