Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 150988
b: refs/heads/master
c: cbcb6d6
h: refs/heads/master
v: v3
  • Loading branch information
Alan Cox authored and Linus Torvalds committed Jun 16, 2009
1 parent 4483054 commit 868ce2c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 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: b231125af7811a2f68c455d3bda95ac170ee4fa6
refs/heads/master: cbcb6d66af4c6169ce1c2d01a3ab345f04b8359d
6 changes: 3 additions & 3 deletions trunk/drivers/char/pty.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ static int pty_write(struct tty_struct *tty, const unsigned char *buf,
struct tty_struct *to = tty->link;
int c;

if (!to || tty->stopped)
if (!to || !to->ldisc || tty->stopped)
return 0;

c = to->receive_room;
Expand Down Expand Up @@ -148,7 +148,7 @@ static int pty_chars_in_buffer(struct tty_struct *tty)
int count;

/* We should get the line discipline lock for "tty->link" */
if (!to || !to->ldisc->ops->chars_in_buffer)
if (!to || !to->ldisc || !to->ldisc->ops->chars_in_buffer)
return 0;

/* The ldisc must report 0 if no characters available to be read */
Expand Down Expand Up @@ -183,7 +183,7 @@ static void pty_flush_buffer(struct tty_struct *tty)
struct tty_struct *to = tty->link;
unsigned long flags;

if (!to)
if (!to || !to->ldisc)
return;

if (to->ldisc->ops->flush_buffer)
Expand Down

0 comments on commit 868ce2c

Please sign in to comment.