X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fchar%2Fn_hdlc.c;h=69ec6399c714b206ea11de8c30d8ba75fd0a9bd6;hb=1481b9109fe771ec8b035d7760f42e36d2bed5d4;hp=ed4e03333ab4646029f61236a554daa23a65a2df;hpb=f076ab8d048f152b968bb1c6313fed88abb037fe;p=pandora-kernel.git 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);