Return code from tty_check_change() should be being
preserved.
Preserve return code from call to tty_check_change().
Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
rc = tty_check_change(tty);
spin_unlock_irqrestore(&ch->ch_lock, flags);
if (rc)
- return -ENODEV;
+ return rc;
rc = ch_bd_ops->drain(tty, 0);
if (rc)
rc = tty_check_change(tty);
spin_unlock_irqrestore(&ch->ch_lock, flags);
if (rc)
- return -ENODEV;
+ return rc;
rc = ch_bd_ops->drain(tty, 0);
if (rc)
rc = tty_check_change(tty);
spin_unlock_irqrestore(&ch->ch_lock, flags);
if (rc)
- return -ENODEV;
+ return rc;
rc = ch_bd_ops->drain(tty, 0);
if (rc)