Re: [PATCH] USB: serial: opticon: fix CTS retrieval at open

2017-01-16 Thread Johan Hovold
On Fri, Jan 13, 2017 at 01:41:47PM +0100, Greg Kroah-Hartman wrote:
> On Fri, Jan 13, 2017 at 01:21:08PM +0100, Johan Hovold wrote:
> > 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 
> > Fixes: 7a6ee2b02751 ("USB: opticon: switch to generic read
> > implementation")
> > Cc: stable 
> > Signed-off-by: Johan Hovold 
> > ---
> >  drivers/usb/serial/opticon.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> 
> Reviewed-by: Greg Kroah-Hartman 

Thanks for the review. Now applied for -next.

Johan
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] USB: serial: opticon: fix CTS retrieval at open

2017-01-13 Thread Greg KH
On Fri, Jan 13, 2017 at 01:21:08PM +0100, Johan Hovold wrote:
> 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 
> Fixes: 7a6ee2b02751 ("USB: opticon: switch to generic read
> implementation")
> Cc: stable 
> Signed-off-by: Johan Hovold 
> ---
>  drivers/usb/serial/opticon.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Reviewed-by: Greg Kroah-Hartman 
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] USB: serial: opticon: fix CTS retrieval at open

2017-01-13 Thread Johan Hovold
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 
Fixes: 7a6ee2b02751 ("USB: opticon: switch to generic read
implementation")
Cc: stable 
Signed-off-by: Johan Hovold 
---
 drivers/usb/serial/opticon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/serial/opticon.c b/drivers/usb/serial/opticon.c
index 5ded6f524d59..b3c64f557d60 100644
--- a/drivers/usb/serial/opticon.c
+++ b/drivers/usb/serial/opticon.c
@@ -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
-- 
2.10.2

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html