Test the return value of UART_PARAM(). Invalid line parameters did not
result in an error before. PR: kern/60284 Submitted by: Thomas Sandford <freebsduser@paradisegreen.co.uk>
This commit is contained in:
parent
e9827c6d93
commit
b662bdc270
@ -225,7 +225,8 @@ uart_tty_param(struct tty *tp, struct termios *t)
|
||||
: UART_PARITY_EVEN;
|
||||
else
|
||||
parity = UART_PARITY_NONE;
|
||||
UART_PARAM(sc, t->c_ospeed, databits, stopbits, parity);
|
||||
if (UART_PARAM(sc, t->c_ospeed, databits, stopbits, parity) != 0)
|
||||
return (EINVAL);
|
||||
UART_SETSIG(sc, UART_SIG_DDTR | UART_SIG_DTR);
|
||||
/* Set input flow control state. */
|
||||
if (!sc->sc_hwiflow) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user