summaryrefslogtreecommitdiffstats
path: root/drivers/char/n_hdlc.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-08-21 13:28:24 +0200
committerIngo Molnar <mingo@elte.hu>2008-08-21 13:28:24 +0200
commit470fba7ebe60ad9185056b080b331abad24b4df9 (patch)
treef83bc13d97adaf5dd0e0f1d6a157b890f868577f /drivers/char/n_hdlc.c
parentdocumentation: move mtrr.txt to Doc/x86/ subdir (diff)
parentLinux v2.6.27-rc4 (diff)
downloadlinux-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.c4
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);