[PATCH 2/2] staging: dgnc: preserve return code

Tobin C. Harding me at tobin.cc
Tue Mar 14 23:44:29 UTC 2017


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 at tobin.cc>
---
 drivers/staging/dgnc/dgnc_tty.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/dgnc/dgnc_tty.c b/drivers/staging/dgnc/dgnc_tty.c
index 2e65d33..1dfbe9e 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)
-- 
2.7.4



More information about the devel mailing list