Commit 9c297d9e authored by Phil Elwell's avatar Phil Elwell Committed by popcornmix
Browse files

serial: 8250: Don't crash when nr_uarts is 0

parent dc08459c
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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];