Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 267356
b: refs/heads/master
c: 631180a
h: refs/heads/master
v: v3
  • Loading branch information
Jiri Slaby authored and Greg Kroah-Hartman committed Oct 18, 2011
1 parent b577265 commit f769b2f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 13 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: 1177c0efc04d032644895b8d757f55b433912596
refs/heads/master: 631180aca723cb92e128fdac5fd144e913ca84e5
21 changes: 9 additions & 12 deletions trunk/drivers/tty/tty_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -1821,7 +1821,7 @@ int tty_release(struct inode *inode, struct file *filp)

static int tty_open(struct inode *inode, struct file *filp)
{
struct tty_struct *tty = NULL;
struct tty_struct *tty;
int noctty, retval;
struct tty_driver *driver;
int index;
Expand Down Expand Up @@ -1892,17 +1892,14 @@ static int tty_open(struct inode *inode, struct file *filp)
return -ENODEV;
}
got_driver:
if (!tty) {
/* check whether we're reopening an existing tty */
tty = tty_driver_lookup_tty(driver, inode, index);

if (IS_ERR(tty)) {
tty_unlock();
mutex_unlock(&tty_mutex);
tty_driver_kref_put(driver);
tty_free_file(filp);
return PTR_ERR(tty);
}
/* check whether we're reopening an existing tty */
tty = tty_driver_lookup_tty(driver, inode, index);
if (IS_ERR(tty)) {
tty_unlock();
mutex_unlock(&tty_mutex);
tty_driver_kref_put(driver);
tty_free_file(filp);
return PTR_ERR(tty);
}

if (tty) {
Expand Down

0 comments on commit f769b2f

Please sign in to comment.