diff options
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, | |||
677 | /* Allocate transmit buffer */ | 677 | /* Allocate transmit buffer */ |
678 | /* sleep until transmit buffer available */ | 678 | /* sleep until transmit buffer available */ |
679 | while (!(tbuf = n_hdlc_buf_get(&n_hdlc->tx_free_buf_list))) { | 679 | while (!(tbuf = n_hdlc_buf_get(&n_hdlc->tx_free_buf_list))) { |
680 | if (file->f_flags & O_NONBLOCK) { | ||
681 | error = -EAGAIN; | ||
682 | break; | ||
683 | } | ||
680 | schedule(); | 684 | schedule(); |
681 | 685 | ||
682 | n_hdlc = tty2n_hdlc (tty); | 686 | n_hdlc = tty2n_hdlc (tty); |