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

From: Miles Bader (miles@lsi.nec.co.jp)
Date: Tue Feb 18 2003 - 01:15:09 EST


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/



This archive was generated by hypermail 2b29 : Sun Feb 23 2003 - 22:00:20 EST