Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 113482
b: refs/heads/master
c: a18992d
h: refs/heads/master
v: v3
  • Loading branch information
Alan Cox authored and Linus Torvalds committed Oct 13, 2008
1 parent 1c68bcb commit eb73ae8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a90610e50b98e18385d4fbea2c9eaefb12c5a75c
refs/heads/master: a18992d4652553f65469ac72b54b7fdd4f058277
9 changes: 4 additions & 5 deletions trunk/drivers/s390/char/fs3270.c
Original file line number Diff line number Diff line change
Expand Up @@ -418,23 +418,22 @@ fs3270_open(struct inode *inode, struct file *filp)
{
struct fs3270 *fp;
struct idal_buffer *ib;
int minor, rc;
int minor, rc = 0;

if (imajor(filp->f_path.dentry->d_inode) != IBM_FS3270_MAJOR)
return -ENODEV;
lock_kernel();
minor = iminor(filp->f_path.dentry->d_inode);
/* Check for minor 0 multiplexer. */
if (minor == 0) {
struct tty_struct *tty = get_current_tty();
if (!tty || tty->driver->major != IBM_TTY3270_MAJOR) {
tty_kref_put(tty);
rc = -ENODEV;
goto out;
return -ENODEV;
}
minor = tty->index + RAW3270_FIRSTMINOR;
tty_kref_put(tty);
}
lock_kernel();
/* Check if some other program is already using fullscreen mode. */
fp = (struct fs3270 *) raw3270_find_view(&fs3270_fn, minor);
if (!IS_ERR(fp)) {
Expand Down Expand Up @@ -476,7 +475,7 @@ fs3270_open(struct inode *inode, struct file *filp)
filp->private_data = fp;
out:
unlock_kernel();
return 0;
return rc;
}

/*
Expand Down

0 comments on commit eb73ae8

Please sign in to comment.