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>
This commit is contained in:

committed by
Linus Torvalds

vanhempi
254702568d
commit
23198fda71
@@ -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;
|
||||
}
|
||||
|
||||
|
Viittaa uudesa ongelmassa
Block a user