From 23198fda7182969b619613a555f8645fdc3dc334 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Mon, 20 Jul 2009 16:05:27 +0100 Subject: 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 Signed-off-by: Linus Torvalds --- drivers/char/nozomi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'drivers/char/nozomi.c') diff --git a/drivers/char/nozomi.c b/drivers/char/nozomi.c index 280b41c507a7..ec58d8c387ff 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; } -- cgit v1.2.3-59-g8ed1b