aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/nozomi.c
diff options
context:
space:
mode:
authorAlan Cox <alan@linux.intel.com>2009-07-20 11:05:27 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-07-20 19:38:43 -0400
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 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)
1866{ 1866{
1867 struct port *port = tty->driver_data; 1867 struct port *port = tty->driver_data;
1868 struct nozomi *dc = get_dc_by_tty(tty); 1868 struct nozomi *dc = get_dc_by_tty(tty);
1869 s32 rval; 1869 s32 rval = 0;
1870 1870
1871 if (unlikely(!dc || !port)) { 1871 if (unlikely(!dc || !port)) {
1872 rval = -ENODEV;
1873 goto exit_in_buffer; 1872 goto exit_in_buffer;
1874 } 1873 }
1875 1874
1876 if (unlikely(!port->port.count)) { 1875 if (unlikely(!port->port.count)) {
1877 dev_err(&dc->pdev->dev, "No tty open?\n"); 1876 dev_err(&dc->pdev->dev, "No tty open?\n");
1878 rval = -ENODEV;
1879 goto exit_in_buffer; 1877 goto exit_in_buffer;
1880 } 1878 }
1881 1879