aboutsummaryrefslogtreecommitdiff
path: root/drivers/char/nozomi.c
diff options
context:
space:
mode:
authorAlan Cox <alan@linux.intel.com>2009-07-20 16:05:27 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2009-07-20 16:38:43 -0700
commit23198fda7182969b619613a555f8645fdc3dc334 (patch)
treed6c322a36d955958ab89ffb0a1a7327dc84e180c /drivers/char/nozomi.c
parent254702568da63ce6f5ad68e77d83b427da693654 (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/nozomi.c')
-rw-r--r--drivers/char/nozomi.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/char/nozomi.c b/drivers/char/nozomi.c
index 280b41c507a..ec58d8c387f 100644
--- a/drivers/char/nozomi.c
+++ b/drivers/char/nozomi.c
@@ -1866,16 +1866,14 @@ static s32 ntty_chars_in_buffer(struct tty_struct *tty)
{
struct port *port = tty->driver_data;
struct nozomi *dc = get_dc_by_tty(tty);
- s32 rval;
+ s32 rval = 0;
if (unlikely(!dc || !port)) {
- rval = -ENODEV;
goto exit_in_buffer;
}
if (unlikely(!port->port.count)) {
dev_err(&dc->pdev->dev, "No tty open?\n");
- rval = -ENODEV;
goto exit_in_buffer;
}