diff --git a/[refs] b/[refs] index 6961c2bb98c5..1743ad850f00 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: cf41aa9e19052d467b54786090e1d3ba9104e394 +refs/heads/master: 94c51dca2ce9a3dd0c52ec6f57df4fb3e81e3ec7 diff --git a/trunk/drivers/usb/serial/opticon.c b/trunk/drivers/usb/serial/opticon.c index e13e1a4d3e1e..6af5bb810062 100644 --- a/trunk/drivers/usb/serial/opticon.c +++ b/trunk/drivers/usb/serial/opticon.c @@ -120,7 +120,10 @@ static int send_control_msg(struct usb_serial_port *port, u8 requesttype, 0, 0, buffer, 1, 0); kfree(buffer); - return retval; + if (retval < 0) + return retval; + + return 0; } static int opticon_open(struct tty_struct *tty, struct usb_serial_port *port) @@ -329,10 +332,13 @@ static int opticon_tiocmset(struct tty_struct *tty, /* Send the new RTS state to the connected device */ mutex_lock(&serial->disc_mutex); - if (!serial->disconnected) + if (!serial->disconnected) { ret = send_control_msg(port, CONTROL_RTS, !rts); - else + if (ret) + ret = usb_translate_errors(ret); + } else { ret = -ENODEV; + } mutex_unlock(&serial->disc_mutex); return ret;