On Sat, Oct 13, 2012 at 05:35:20PM +0200, Johan Hovold wrote:
> Make sure we do not return USB-internal error codes to userspace.
> 
> Signed-off-by: Johan Hovold <jhov...@gmail.com>
> ---
>  drivers/usb/serial/ftdi_sio.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
> index 5fc2f1f..6d1a755 100644
> --- a/drivers/usb/serial/ftdi_sio.c
> +++ b/drivers/usb/serial/ftdi_sio.c
> @@ -1094,6 +1094,7 @@ static int update_mctrl(struct usb_serial_port *port, 
> unsigned int set,
>                               (clear & TIOCM_DTR) ? "LOW" : "unchanged",
>                               (set & TIOCM_RTS) ? "HIGH" :
>                               (clear & TIOCM_RTS) ? "LOW" : "unchanged");
> +             rv = usb_translate_errors(rv);

Greg, I just realised there's a trivial merge conflict here against
usb-next and Linus tree due to the recent dev_dbg-conversion.

Let me know if you want me to resubmit a rebased series.

Thanks,
Johan

>       } else {
>               dbg("%s - DTR %s, RTS %s", __func__,
>                               (set & TIOCM_DTR) ? "HIGH" :
> @@ -2315,8 +2316,10 @@ static int ftdi_tiocmget(struct tty_struct *tty)
>                       FTDI_SIO_GET_MODEM_STATUS_REQUEST_TYPE,
>                       0, priv->interface,
>                       buf, len, WDR_TIMEOUT);
> -     if (ret < 0)
> +     if (ret < 0) {
> +             ret = usb_translate_errors(ret);
>               goto out;
> +     }
>  
>       ret =   (buf[0] & FTDI_SIO_DSR_MASK  ? TIOCM_DSR : 0) |
>               (buf[0] & FTDI_SIO_CTS_MASK  ? TIOCM_CTS : 0) |
--
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

Reply via email to