[PATCH] Handle null OLD argument in nb85e_uart's nb85e_uart_set_termios function

Miles Bader (miles@lsi.nec.co.jp)
Tue, 18 Feb 2003 15:15:09 +0900 (JST)


diff -ruN -X../cludes linux-2.5.62-uc0.orig/drivers/serial/nb85e_uart.c linux-2.5.62-uc0/drivers/serial/nb85e_uart.c
--- linux-2.5.62-uc0.orig/drivers/serial/nb85e_uart.c 2003-01-22 10:13:09.000000000 +0900
+++ linux-2.5.62-uc0/drivers/serial/nb85e_uart.c 2003-02-18 11:41:08.000000000 +0900
@@ -472,7 +472,8 @@
/* Restrict flags to legal values. */
if ((cflags & CSIZE) != CS7 && (cflags & CSIZE) != CS8)
/* The new value of CSIZE is invalid, use the old value. */
- cflags = (cflags & ~CSIZE) | (old->c_cflag & CSIZE);
+ cflags = (cflags & ~CSIZE)
+ | (old ? (old->c_cflag & CSIZE) : CS8);

termios->c_cflag = cflags;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/