Skip to content

Commit

Permalink
[PATCH] serial/uartlite: Only enable port if request_port succeeded
Browse files Browse the repository at this point in the history
The uartlite driver used to always enable the port even if request_port
failed causing havoc. This patch fixes it.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Peter Korsgaard authored and Linus Torvalds committed Dec 22, 2006
1 parent b2b2cbc commit e21654a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/serial/uartlite.c
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,8 @@ static int ulite_request_port(struct uart_port *port)

static void ulite_config_port(struct uart_port *port, int flags)
{
ulite_request_port(port);
port->type = PORT_UARTLITE;
if (!ulite_request_port(port))
port->type = PORT_UARTLITE;
}

static int ulite_verify_port(struct uart_port *port, struct serial_struct *ser)
Expand Down

0 comments on commit e21654a

Please sign in to comment.