提交 e21654a7 编写于 作者: P Peter Korsgaard 提交者: 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: NPeter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 b2b2cbc4
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册