]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
staging: dgnc: preserve return code
authorTobin C. Harding <me@tobin.cc>
Tue, 14 Mar 2017 23:44:29 +0000 (10:44 +1100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 16 Mar 2017 02:45:42 +0000 (11:45 +0900)
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>
drivers/staging/dgnc/dgnc_tty.c

index 854bd1da8887fbd0f1f9772950cf879d631e4d25..f7e754eba154c064656d1c03d376b852a9bbd7e4 100644 (file)
@@ -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)