summaryrefslogtreecommitdiff
path: root/drivers/usb/serial/io_edgeport.c
diff options
context:
space:
mode:
authorJohan Hovold <johan@kernel.org>2023-06-04 14:35:03 +0200
committerJohan Hovold <johan@kernel.org>2023-06-07 17:00:23 +0200
commit6ff58ae17fd9523246a260434133ed9ab7f56df2 (patch)
tree286bf3fdeec1bef50a64f4597deef90c55f1c82f /drivers/usb/serial/io_edgeport.c
parent9561de3a55bed6bdd44a12820ba81ec416e705a7 (diff)
USB: serial: return errors from break handling
Start propagating errors to user space when setting the break state fails. This will be used by follow-on changes to also report when a driver or device does not support break control. Tested-by: Corey Minyard <cminyard@mvista.com> Signed-off-by: Johan Hovold <johan@kernel.org>
Diffstat (limited to 'drivers/usb/serial/io_edgeport.c')
-rw-r--r--drivers/usb/serial/io_edgeport.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/usb/serial/io_edgeport.c b/drivers/usb/serial/io_edgeport.c
index 3a4c0febf335..abe4bbb0ac65 100644
--- a/drivers/usb/serial/io_edgeport.c
+++ b/drivers/usb/serial/io_edgeport.c
@@ -1560,12 +1560,12 @@ static int edge_ioctl(struct tty_struct *tty,
* SerialBreak
* this function sends a break to the port
*****************************************************************************/
-static void edge_break(struct tty_struct *tty, int break_state)
+static int edge_break(struct tty_struct *tty, int break_state)
{
struct usb_serial_port *port = tty->driver_data;
struct edgeport_port *edge_port = usb_get_serial_port_data(port);
struct edgeport_serial *edge_serial = usb_get_serial_data(port->serial);
- int status;
+ int status = 0;
if (!edge_serial->is_epic ||
edge_serial->epic_descriptor.Supports.IOSPChase) {
@@ -1597,6 +1597,8 @@ static void edge_break(struct tty_struct *tty, int break_state)
dev_dbg(&port->dev, "%s - error sending break set/clear command.\n",
__func__);
}
+
+ return status;
}