mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 10:00:17 +00:00
serial: 8250: Don't crash when nr_uarts is 0
This commit is contained in:
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user