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:
Marcel Moolenaar 2004-02-14 05:54:39 +00:00
parent e9827c6d93
commit b662bdc270
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=125797

View file

@ -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) {