Commit e21654a7 authored by Peter Korsgaard's avatar Peter Korsgaard Committed by Linus Torvalds

[PATCH] serial/uartlite: Only enable port if request_port succeeded

The uartlite driver used to always enable the port even if request_port
failed causing havoc. This patch fixes it.
Signed-off-by: default avatarPeter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent b2b2cbc4
...@@ -278,7 +278,7 @@ static int ulite_request_port(struct uart_port *port) ...@@ -278,7 +278,7 @@ static int ulite_request_port(struct uart_port *port)
static void ulite_config_port(struct uart_port *port, int flags) static void ulite_config_port(struct uart_port *port, int flags)
{ {
ulite_request_port(port); if (!ulite_request_port(port))
port->type = PORT_UARTLITE; port->type = PORT_UARTLITE;
} }
......
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