[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: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Peter Korsgaard 2006-12-22 16:38:40 +01:00 committed by Linus Torvalds
parent b2b2cbc4b2
commit e21654a756

View File

@ -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)