diff options
author | Johan Hovold <johan@kernel.org> | 2023-06-04 15:35:05 +0300 |
---|---|---|
committer | Johan Hovold <johan@kernel.org> | 2023-06-07 18:00:24 +0300 |
commit | c9d934053d9e850bc901b6425eacb5fe3d4b1738 (patch) | |
tree | 70912a8787565c9472b6220c31ae16d0994e209a /drivers/usb/serial | |
parent | f4bbae27b32ea0ffb9e25931b9769600e8d8a664 (diff) | |
download | linux-c9d934053d9e850bc901b6425eacb5fe3d4b1738.tar.xz |
USB: serial: report unsupported break signalling
Instead of returning success when a driver does not support break
signalling, return an error to let user space know and to avoid waiting
when break is not supported.
Tested-by: Corey Minyard <cminyard@mvista.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Diffstat (limited to 'drivers/usb/serial')
-rw-r--r-- | drivers/usb/serial/usb-serial.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c index 470634444af7..7b4805c1004d 100644 --- a/drivers/usb/serial/usb-serial.c +++ b/drivers/usb/serial/usb-serial.c @@ -541,7 +541,7 @@ static int serial_break(struct tty_struct *tty, int break_state) if (port->serial->type->break_ctl) return port->serial->type->break_ctl(tty, break_state); - return 0; + return -ENOTTY; } static int serial_proc_show(struct seq_file *m, void *v) |