aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390')
-rw-r--r--drivers/s390/char/fs3270.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/s390/char/fs3270.c b/drivers/s390/char/fs3270.c
index 84fbc90480dc..1227f4591f8d 100644
--- a/drivers/s390/char/fs3270.c
+++ b/drivers/s390/char/fs3270.c
@@ -426,18 +426,14 @@ fs3270_open(struct inode *inode, struct file *filp)
426 minor = iminor(filp->f_path.dentry->d_inode); 426 minor = iminor(filp->f_path.dentry->d_inode);
427 /* Check for minor 0 multiplexer. */ 427 /* Check for minor 0 multiplexer. */
428 if (minor == 0) { 428 if (minor == 0) {
429 struct tty_struct *tty; 429 struct tty_struct *tty = get_current_tty();
430 mutex_lock(&tty_mutex);
431 tty = get_current_tty();
432 if (!tty || tty->driver->major != IBM_TTY3270_MAJOR) { 430 if (!tty || tty->driver->major != IBM_TTY3270_MAJOR) {
433 tty_kref_put(tty); 431 tty_kref_put(tty);
434 mutex_unlock(&tty_mutex);
435 rc = -ENODEV; 432 rc = -ENODEV;
436 goto out; 433 goto out;
437 } 434 }
438 minor = tty->index + RAW3270_FIRSTMINOR; 435 minor = tty->index + RAW3270_FIRSTMINOR;
439 tty_kref_put(tty); 436 tty_kref_put(tty);
440 mutex_unlock(&tty_mutex);
441 } 437 }
442 /* Check if some other program is already using fullscreen mode. */ 438 /* Check if some other program is already using fullscreen mode. */
443 fp = (struct fs3270 *) raw3270_find_view(&fs3270_fn, minor); 439 fp = (struct fs3270 *) raw3270_find_view(&fs3270_fn, minor);