diff options
author | Alan Cox <alan@redhat.com> | 2008-07-22 12:16:42 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-22 22:03:27 +0200 |
commit | d76f2f4462bbb2cf7bc83a35c5278177aa627e89 (patch) | |
tree | beac09e41cf05235676752dac220d4172bb3ec66 /drivers | |
parent | tty-usb-io_edgeport: Coding style (diff) | |
download | linux-d76f2f4462bbb2cf7bc83a35c5278177aa627e89.tar.xz linux-d76f2f4462bbb2cf7bc83a35c5278177aa627e89.zip |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/serial/io_edgeport.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/usb/serial/io_edgeport.c b/drivers/usb/serial/io_edgeport.c index b4bd6847a96d..bfa508ddb0fe 100644 --- a/drivers/usb/serial/io_edgeport.c +++ b/drivers/usb/serial/io_edgeport.c @@ -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); |