Skip to content

Commit 2eee050

Browse files
committed
USB: serial: opticon: fix CTS retrieval at open
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 <[email protected]> Fixes: 7a6ee2b ("USB: opticon: switch to generic read implementation") Cc: stable <[email protected]> Reviewed-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Johan Hovold <[email protected]>
1 parent 39712e8 commit 2eee050

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/usb/serial/opticon.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ static int opticon_open(struct tty_struct *tty, struct usb_serial_port *port)
142142
usb_clear_halt(port->serial->dev, port->read_urb->pipe);
143143

144144
res = usb_serial_generic_open(tty, port);
145-
if (!res)
145+
if (res)
146146
return res;
147147

148148
/* Request CTS line state, sometimes during opening the current

0 commit comments

Comments
 (0)