mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 11:26:02 +09:00
USB: serial: opticon: fix CTS retrieval at open
commit2eee05020aupstream. The opticon driver used a control request at open to trigger a CTS status notification to be sent over the bulk-in pipe. When the driver was converted to using the generic read implementation, an inverted test prevented this request from being sent, something which could lead to TIOCMGET reporting an incorrect CTS state. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Fixes:7a6ee2b027("USB: opticon: switch to generic read implementation") Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
06b1cf346a
commit
b04a2ca5c4
@@ -142,7 +142,7 @@ static int opticon_open(struct tty_struct *tty, struct usb_serial_port *port)
|
||||
usb_clear_halt(port->serial->dev, port->read_urb->pipe);
|
||||
|
||||
res = usb_serial_generic_open(tty, port);
|
||||
if (!res)
|
||||
if (res)
|
||||
return res;
|
||||
|
||||
/* Request CTS line state, sometimes during opening the current
|
||||
|
||||
Reference in New Issue
Block a user