Skip to contentSkip to conversation

serial: sccnxp: Improve verify_port

PATCH Superseded Alexander Shiyan 2 participants 3 messages May 14, 2013 TTY layer and serial drivers

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 serial: sccnxp: Improve verify_port

---
 drivers/tty/serial/sccnxp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/tty/serial/sccnxp.c +2 -2
index c773041..92e6195 100644
@@ -713,8 +713,8 @@ static void sccnxp_config_port(struct uart_port *port, int flags)
 
 static int sccnxp_verify_port(struct uart_port *port, struct serial_struct *s)
 {
-	if ((s->type == PORT_UNKNOWN) || (s->type == PORT_SC26XX))
-		return 0;
+	if ((s->type != PORT_UNKNOWN) && (s->type != PORT_SC26XX))
+		return -EINVAL;
 	if (s->irq == port->irq)
 		return 0;
 
Signature · 1 line
1.8.1.5
#2 lore raw
Quoted 8 lines · Alexander Shiyan
Quoted 2 lines

Improve it how? Why improve it? You need to provide a lot more information in your patch changelog entry before I can accept this.

Care to try again?

Sure :)

---