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>
This commit is contained in:
Alan Cox
2009-07-20 16:05:27 +01:00
committed by Linus Torvalds
parent 254702568d
commit 23198fda71
7 changed files with 10 additions and 10 deletions

View File

@ -750,7 +750,7 @@ static int acm_tty_chars_in_buffer(struct tty_struct *tty)
{
struct acm *acm = tty->driver_data;
if (!ACM_READY(acm))
return -EINVAL;
return 0;
/*
* This is inaccurate (overcounts), but it works.
*/