X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fs390%2Fchar%2Ffs3270.c;h=40759c33477d1d38bca2400f034affbf24e3efcc;hb=a18992d4652553f65469ac72b54b7fdd4f058277;hp=1227f4591f8d76078631a73d1cd61f1a4045cd06;hpb=a90610e50b98e18385d4fbea2c9eaefb12c5a75c;p=linux-2.6-omap-h63xx.git diff --git a/drivers/s390/char/fs3270.c b/drivers/s390/char/fs3270.c index 1227f4591f8..40759c33477 100644 --- a/drivers/s390/char/fs3270.c +++ b/drivers/s390/char/fs3270.c @@ -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)) { @@ -476,7 +475,7 @@ fs3270_open(struct inode *inode, struct file *filp) filp->private_data = fp; out: unlock_kernel(); - return 0; + return rc; } /*