mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
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
1 changed files with 2 additions and 1 deletions
|
|
@ -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…
Reference in a new issue