Commit af091051 authored by Miles Bader's avatar Miles Bader Committed by Linus Torvalds

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

parent 12a7558c
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment