You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user