From: Johan Hovold Date: Sun, 4 Jun 2023 12:35:05 +0000 (+0200) Subject: USB: serial: report unsupported break signalling X-Git-Tag: v6.5-rc1~73^2~5^2~1 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=c9d934053d9e850bc901b6425eacb5fe3d4b1738;p=tomoyo%2Ftomoyo-test1.git 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 Signed-off-by: Johan Hovold --- 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)