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/char/pcmcia | |
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/char/pcmcia')
-rw-r--r-- | drivers/char/pcmcia/ipwireless/tty.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/char/pcmcia/ipwireless/tty.c b/drivers/char/pcmcia/ipwireless/tty.c index 569f2f7743a7..674b3ab3587d 100644 --- a/drivers/char/pcmcia/ipwireless/tty.c +++ b/drivers/char/pcmcia/ipwireless/tty.c | |||
@@ -320,10 +320,10 @@ static int ipw_chars_in_buffer(struct tty_struct *linux_tty) | |||
320 | struct ipw_tty *tty = linux_tty->driver_data; | 320 | struct ipw_tty *tty = linux_tty->driver_data; |
321 | 321 | ||
322 | if (!tty) | 322 | if (!tty) |
323 | return -ENODEV; | 323 | return 0; |
324 | 324 | ||
325 | if (!tty->open_count) | 325 | if (!tty->open_count) |
326 | return -EINVAL; | 326 | return 0; |
327 | 327 | ||
328 | return tty->tx_bytes_queued; | 328 | return tty->tx_bytes_queued; |
329 | } | 329 | } |