diff options
author | Alan Cox <alan@linux.intel.com> | 2009-07-20 11:05:27 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-07-20 19:38:43 -0400 |
commit | 23198fda7182969b619613a555f8645fdc3dc334 (patch) | |
tree | d6c322a36d955958ab89ffb0a1a7327dc84e180c /drivers/usb/class | |
parent | 254702568da63ce6f5ad68e77d83b427da693654 (diff) |
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/usb/class')
-rw-r--r-- | drivers/usb/class/cdc-acm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index 5b15d9d8896b..e1f89416ef8c 100644 --- a/drivers/usb/class/cdc-acm.c +++ b/drivers/usb/class/cdc-acm.c | |||
@@ -750,7 +750,7 @@ static int acm_tty_chars_in_buffer(struct tty_struct *tty) | |||
750 | { | 750 | { |
751 | struct acm *acm = tty->driver_data; | 751 | struct acm *acm = tty->driver_data; |
752 | if (!ACM_READY(acm)) | 752 | if (!ACM_READY(acm)) |
753 | return -EINVAL; | 753 | return 0; |
754 | /* | 754 | /* |
755 | * This is inaccurate (overcounts), but it works. | 755 | * This is inaccurate (overcounts), but it works. |
756 | */ | 756 | */ |