6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Johan Hovold [ Upstream commit c9d934053d9e850bc901b6425eacb5fe3d4b1738 ] 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 Stable-dep-of: ae0e61d95677 ("USB: serial: fix ioctl hangup race") Signed-off-by: Sasha Levin --- drivers/usb/serial/usb-serial.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c index d0f9db08125e0..9ecc108c2d275 100644 --- a/drivers/usb/serial/usb-serial.c +++ b/drivers/usb/serial/usb-serial.c @@ -540,7 +540,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) -- 2.53.0