lkml.org 
[lkml]   [2003]   [Feb]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] Handle null OLD argument in nb85e_uart's nb85e_uart_set_termios function
Date
From
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/
\
 
 \ /
  Last update: 2005-03-22 13:33    [W:0.030 / U:4.668 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site