diff options
author | Tobin C. Harding <me@tobin.cc> | 2017-03-15 10:44:29 +1100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-03-16 11:45:42 +0900 |
commit | f15e60ce4ee90b713e1d84653c715dc8fa0d49ec (patch) | |
tree | 65d1ba8581f3cbd4b2e9f9abf89c8cf6e2cb96e9 /drivers/staging/dgnc | |
parent | 9280b3a61ce006c803b616a922a635d04ffb040b (diff) | |
download | linux-stable-f15e60ce4ee90b713e1d84653c715dc8fa0d49ec.tar.gz linux-stable-f15e60ce4ee90b713e1d84653c715dc8fa0d49ec.tar.bz2 linux-stable-f15e60ce4ee90b713e1d84653c715dc8fa0d49ec.zip |
staging: dgnc: preserve return code
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>
Diffstat (limited to 'drivers/staging/dgnc')
-rw-r--r-- | drivers/staging/dgnc/dgnc_tty.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/dgnc/dgnc_tty.c b/drivers/staging/dgnc/dgnc_tty.c index 854bd1da8887..f7e754eba154 100644 --- a/drivers/staging/dgnc/dgnc_tty.c +++ b/drivers/staging/dgnc/dgnc_tty.c @@ -2394,7 +2394,7 @@ static int dgnc_tty_ioctl(struct tty_struct *tty, unsigned int cmd, 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) @@ -2419,7 +2419,7 @@ static int dgnc_tty_ioctl(struct tty_struct *tty, unsigned int cmd, 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) @@ -2437,7 +2437,7 @@ static int dgnc_tty_ioctl(struct tty_struct *tty, unsigned int cmd, 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) |