Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 377307
b: refs/heads/master
c: 7c61c3d
h: refs/heads/master
i:
  377305: 8e17dc1
  377303: 6433345
v: v3
  • Loading branch information
Peter Hurley authored and Greg Kroah-Hartman committed Jun 17, 2013
1 parent 05cc2a8 commit ba4ba63
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 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: ef223fb3d1d61c2a95a89cdc02f8e86dac96ddc3
refs/heads/master: 7c61c3d8f44d5d822f758754287af644307b4af9
13 changes: 5 additions & 8 deletions trunk/drivers/tty/pty.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,14 +244,9 @@ static void pty_flush_buffer(struct tty_struct *tty)

static int pty_open(struct tty_struct *tty, struct file *filp)
{
int retval = -ENODEV;

if (!tty || !tty->link)
goto out;

set_bit(TTY_IO_ERROR, &tty->flags);
return -ENODEV;

retval = -EIO;
if (test_bit(TTY_OTHER_CLOSED, &tty->flags))
goto out;
if (test_bit(TTY_PTY_LOCK, &tty->link->flags))
Expand All @@ -262,9 +257,11 @@ static int pty_open(struct tty_struct *tty, struct file *filp)
clear_bit(TTY_IO_ERROR, &tty->flags);
clear_bit(TTY_OTHER_CLOSED, &tty->link->flags);
set_bit(TTY_THROTTLED, &tty->flags);
retval = 0;
return 0;

out:
return retval;
set_bit(TTY_IO_ERROR, &tty->flags);
return -EIO;
}

static void pty_set_termios(struct tty_struct *tty,
Expand Down

0 comments on commit ba4ba63

Please sign in to comment.