From: Peter Korsgaard <jacmet@sunsite.dk>
To: torvalds@osdl.org
Cc: linux-serial@vger.kernel.org
Subject: [PATCH] serial/uartlite: Only enable port if request_port succeeded
Date: Fri, 22 Dec 2006 15:56:33 +0100 [thread overview]
Message-ID: <87bqlwf07y.fsf@vps.korsgaard.com> (raw)
The uartlite driver would happily enable the port even if request_port
failed causing havoc. This patch fixes it.
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
diff -urpN linux-2.6.20-rc1/drivers/serial/uartlite.c linux-2.6.20-rc1.new/drivers/serial/uartlite.c
--- linux-2.6.20-rc1/drivers/serial/uartlite.c 2006-12-22 15:11:37.000000000 +0100
+++ linux-2.6.20-rc1.new/drivers/serial/uartlite.c 2006-12-22 15:20:51.000000000 +0100
@@ -278,8 +278,8 @@ static int ulite_request_port(struct uar
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)
--
Bye, Peter Korsgaard
next reply other threads:[~2006-12-22 15:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-22 14:56 Peter Korsgaard [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-12-22 15:38 [PATCH] serial/uartlite: Only enable port if request_port succeeded Peter Korsgaard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87bqlwf07y.fsf@vps.korsgaard.com \
--to=jacmet@sunsite.dk \
--cc=linux-serial@vger.kernel.org \
--cc=torvalds@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.