Commit 7acd1ea4 authored by Russell King's avatar Russell King

[SERIAL] 8250: prevent ports with zero clocks being registered.

parent 0fa7474a
...@@ -2350,6 +2350,9 @@ int serial8250_register_port(struct uart_port *port) ...@@ -2350,6 +2350,9 @@ int serial8250_register_port(struct uart_port *port)
struct uart_8250_port *uart; struct uart_8250_port *uart;
int ret = -ENOSPC; int ret = -ENOSPC;
if (port->uartclk == 0)
return -EINVAL;
down(&serial_sem); down(&serial_sem);
uart = serial8250_find_match_or_unused(port); uart = serial8250_find_match_or_unused(port);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment