summaryrefslogtreecommitdiffstats
path: root/drivers/char/hvc_console.c
diff options
context:
space:
mode:
authorAlan Cox <alan@linux.intel.com>2009-07-20 17:05:27 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2009-07-21 01:38:43 +0200
commit23198fda7182969b619613a555f8645fdc3dc334 (patch)
treed6c322a36d955958ab89ffb0a1a7327dc84e180c /drivers/char/hvc_console.c
parentspecialix.c: convert nested spin_lock_irqsave to spin_lock (diff)
downloadlinux-23198fda7182969b619613a555f8645fdc3dc334.tar.xz
linux-23198fda7182969b619613a555f8645fdc3dc334.zip
tty: fix chars_in_buffers
This function does not have an error return and returning an error is instead interpreted as having a lot of pending bytes. Reported by Jeff Harris who provided a list of some of the remaining offenders. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/char/hvc_console.c')
-rw-r--r--drivers/char/hvc_console.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/char/hvc_console.c b/drivers/char/hvc_console.c
index 94e7e3c8c05a..d97779ef72cb 100644
--- a/drivers/char/hvc_console.c
+++ b/drivers/char/hvc_console.c
@@ -552,7 +552,7 @@ static int hvc_chars_in_buffer(struct tty_struct *tty)
struct hvc_struct *hp = tty->driver_data;
if (!hp)
- return -1;
+ return 0;
return hp->n_outbuf;
}