mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-24 01:41:39 +00:00
io_edgeport: Fix various bogus returns to the tty layer
The edgeport reports negative error codes to functions that do not expect them. This can cause ports to jam forever Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
03f0dbf74c
commit
d76f2f4462
1 changed files with 6 additions and 6 deletions
|
@ -1404,15 +1404,15 @@ static int edge_write_room(struct tty_struct *tty)
|
|||
dbg("%s", __func__);
|
||||
|
||||
if (edge_port == NULL)
|
||||
return -ENODEV;
|
||||
return 0;
|
||||
if (edge_port->closePending)
|
||||
return -ENODEV;
|
||||
return 0;
|
||||
|
||||
dbg("%s - port %d", __func__, port->number);
|
||||
|
||||
if (!edge_port->open) {
|
||||
dbg("%s - port not opened", __func__);
|
||||
return -EINVAL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* total of both buffers is still txCredit */
|
||||
|
@ -1444,13 +1444,13 @@ static int edge_chars_in_buffer(struct tty_struct *tty)
|
|||
dbg("%s", __func__);
|
||||
|
||||
if (edge_port == NULL)
|
||||
return -ENODEV;
|
||||
return 0;
|
||||
if (edge_port->closePending)
|
||||
return -ENODEV;
|
||||
return 0;
|
||||
|
||||
if (!edge_port->open) {
|
||||
dbg("%s - port not opened", __func__);
|
||||
return -EINVAL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
spin_lock_irqsave(&edge_port->ep_lock, flags);
|
||||
|
|
Loading…
Reference in a new issue