Hi Alan,

On Wed, May 10, 2017 at 08:41:51PM +0100, Alan Cox wrote:
> > +   if (!(tmp_termios.c_cflag & CRTSCTS)) {
> > +           tmp_termios.c_cflag |= CRTSCTS;
> > +           ret = tty_set_termios(tty, &tmp_termios);
> > +           if (ret)
> > +                   pr_warn("speakup: Failed to set hardware flow 
> > control\n");
> 
> You should check the tty c_cflag after the call rather than rely on an
> error code. Strictly speaking tty_set_termios should error if no tty bits
> are changed by the request but it never has on Linux. Instead check the
> tty gave you the result you wanted.
Thanks. I will replace the check for return value with check for c_cflag.

May be we should fix this in tty_set_termios?
_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to