]> git.hungrycats.org Git - linux/commitdiff
[PATCH] Handle null OLD argument in nb85e_uart's nb85e_uart_set_termios function
authorMiles Bader <miles@lsi.nec.co.jp>
Tue, 18 Feb 2003 13:38:50 +0000 (05:38 -0800)
committerLinus Torvalds <torvalds@home.transmeta.com>
Tue, 18 Feb 2003 13:38:50 +0000 (05:38 -0800)
drivers/serial/nb85e_uart.c

index 873aba4fc8fa01809672f9686cb4c639505b80f0..d5d1694d190a3aed5400b905cddeb6ccb29953a6 100644 (file)
@@ -472,7 +472,8 @@ nb85e_uart_set_termios (struct uart_port *port, struct termios *termios,
        /* 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;