Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 28394
b: refs/heads/master
c: db54a53
h: refs/heads/master
v: v3
  • Loading branch information
Luiz Fernando N. Capitulino authored and Greg Kroah-Hartman committed Jun 21, 2006
1 parent 7b2d151 commit e7d5c7b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 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: 043ea18b2e145c4c9cb3c30757a65fe0f1678a35
refs/heads/master: db54a53d26322e978e66482208afabaab9cd0752
14 changes: 6 additions & 8 deletions trunk/drivers/usb/serial/usb-serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ static int serial_write (struct tty_struct * tty, const unsigned char *buf, int
static int serial_write_room (struct tty_struct *tty)
{
struct usb_serial_port *port = tty->driver_data;
int retval = -EINVAL;
int retval = -ENODEV;

if (!port)
goto exit;
Expand All @@ -327,7 +327,7 @@ static int serial_write_room (struct tty_struct *tty)
static int serial_chars_in_buffer (struct tty_struct *tty)
{
struct usb_serial_port *port = tty->driver_data;
int retval = -EINVAL;
int retval = -ENODEV;

if (!port)
goto exit;
Expand Down Expand Up @@ -497,19 +497,18 @@ static int serial_tiocmget (struct tty_struct *tty, struct file *file)
struct usb_serial_port *port = tty->driver_data;

if (!port)
goto exit;
return -ENODEV;

dbg("%s - port %d", __FUNCTION__, port->number);

if (!port->open_count) {
dbg("%s - port not open", __FUNCTION__);
goto exit;
return -ENODEV;
}

if (port->serial->type->tiocmget)
return port->serial->type->tiocmget(port, file);

exit:
return -EINVAL;
}

Expand All @@ -519,19 +518,18 @@ static int serial_tiocmset (struct tty_struct *tty, struct file *file,
struct usb_serial_port *port = tty->driver_data;

if (!port)
goto exit;
return -ENODEV;

dbg("%s - port %d", __FUNCTION__, port->number);

if (!port->open_count) {
dbg("%s - port not open", __FUNCTION__);
goto exit;
return -ENODEV;
}

if (port->serial->type->tiocmset)
return port->serial->type->tiocmset(port, file, set, clear);

exit:
return -EINVAL;
}

Expand Down

0 comments on commit e7d5c7b

Please sign in to comment.