Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 364463
b: refs/heads/master
c: 94c51dc
h: refs/heads/master
i:
  364461: 3506d19
  364459: c0386e0
  364455: 7c40737
  364447: 2c21011
v: v3
  • Loading branch information
Johan Hovold authored and Greg Kroah-Hartman committed Mar 25, 2013
1 parent 0ad8a73 commit 38ea802
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cf41aa9e19052d467b54786090e1d3ba9104e394
refs/heads/master: 94c51dca2ce9a3dd0c52ec6f57df4fb3e81e3ec7
12 changes: 9 additions & 3 deletions trunk/drivers/usb/serial/opticon.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 38ea802

Please sign in to comment.