From: Alan Cox Date: Mon, 17 Sep 2012 11:03:39 +0000 (+0100) Subject: tty: Fix hvc return X-Git-Tag: upstream/snapshot3+hdmi~6592^2~38 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d83114e9754cf5deb3424217ff2f10cace1428e3;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git tty: Fix hvc return HVC returns a size of -1 bytes for the write room in some cases. This is bogus and not handled by the tty layer at all. Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/hvc/hvc_console.c b/drivers/tty/hvc/hvc_console.c index 7f80f15..4a65299 100644 --- a/drivers/tty/hvc/hvc_console.c +++ b/drivers/tty/hvc/hvc_console.c @@ -558,7 +558,7 @@ static int hvc_write_room(struct tty_struct *tty) struct hvc_struct *hp = tty->driver_data; if (!hp) - return -1; + return 0; return hp->outbuf_size - hp->n_outbuf; }