aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/char/fs3270.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/char/fs3270.c')
-rw-r--r--drivers/s390/char/fs3270.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/s390/char/fs3270.c b/drivers/s390/char/fs3270.c
index d18e6d2e0b49..3ef5425d0eb8 100644
--- a/drivers/s390/char/fs3270.c
+++ b/drivers/s390/char/fs3270.c
@@ -430,11 +430,12 @@ fs3270_open(struct inode *inode, struct file *filp)
430 mutex_lock(&tty_mutex); 430 mutex_lock(&tty_mutex);
431 tty = get_current_tty(); 431 tty = get_current_tty();
432 if (!tty || tty->driver->major != IBM_TTY3270_MAJOR) { 432 if (!tty || tty->driver->major != IBM_TTY3270_MAJOR) {
433 mutex_unlock(&tty_mutex); 433 tty_kref_put(tty);
434 rc = -ENODEV; 434 rc = -ENODEV;
435 goto out; 435 goto out;
436 } 436 }
437 minor = tty->index + RAW3270_FIRSTMINOR; 437 minor = tty->index + RAW3270_FIRSTMINOR;
438 tty_kref_put(tty);
438 mutex_unlock(&tty_mutex); 439 mutex_unlock(&tty_mutex);
439 } 440 }
440 /* Check if some other program is already using fullscreen mode. */ 441 /* Check if some other program is already using fullscreen mode. */