[PATCH] serial: sccnxp: Improve verify_port

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Alexander Shiyan <shc_work@xxxxxxx>
---
 drivers/tty/serial/sccnxp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/serial/sccnxp.c b/drivers/tty/serial/sccnxp.c
index c773041..92e6195 100644
--- a/drivers/tty/serial/sccnxp.c
+++ b/drivers/tty/serial/sccnxp.c
@@ -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;
 
-- 
1.8.1.5

--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux