diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-08-21 13:28:24 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-08-21 13:28:24 +0200 |
commit | 470fba7ebe60ad9185056b080b331abad24b4df9 (patch) | |
tree | f83bc13d97adaf5dd0e0f1d6a157b890f868577f /drivers/char/n_hdlc.c | |
parent | documentation: move mtrr.txt to Doc/x86/ subdir (diff) | |
parent | Linux v2.6.27-rc4 (diff) | |
download | linux-470fba7ebe60ad9185056b080b331abad24b4df9.tar.xz linux-470fba7ebe60ad9185056b080b331abad24b4df9.zip |
Merge branch 'linus' into x86/doc
Diffstat (limited to 'drivers/char/n_hdlc.c')
-rw-r--r-- | drivers/char/n_hdlc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/char/n_hdlc.c b/drivers/char/n_hdlc.c index ed4e03333ab4..69ec6399c714 100644 --- a/drivers/char/n_hdlc.c +++ b/drivers/char/n_hdlc.c @@ -677,6 +677,10 @@ static ssize_t n_hdlc_tty_write(struct tty_struct *tty, struct file *file, /* Allocate transmit buffer */ /* sleep until transmit buffer available */ while (!(tbuf = n_hdlc_buf_get(&n_hdlc->tx_free_buf_list))) { + if (file->f_flags & O_NONBLOCK) { + error = -EAGAIN; + break; + } schedule(); n_hdlc = tty2n_hdlc (tty); |