Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 46680
b: refs/heads/master
c: 3ff4fd9
h: refs/heads/master
v: v3
  • Loading branch information
Oliver Neukum authored and Greg Kroah-Hartman committed Feb 7, 2007
1 parent 416bdaa commit 1a194b2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 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: 4b10f0f3a0d4caa8b615cd1f770a70912967a3cd
refs/heads/master: 3ff4fd94c86259e44d58946af34231a1586b5d93
3 changes: 2 additions & 1 deletion trunk/drivers/usb/serial/usb-serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -281,14 +281,15 @@ static void serial_close(struct tty_struct *tty, struct file * filp)
static int serial_write (struct tty_struct * tty, const unsigned char *buf, int count)
{
struct usb_serial_port *port = tty->driver_data;
int retval = -EINVAL;
int retval = -ENODEV;

if (!port || port->serial->dev->state == USB_STATE_NOTATTACHED)
goto exit;

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

if (!port->open_count) {
retval = -EINVAL;
dbg("%s - port not opened", __FUNCTION__);
goto exit;
}
Expand Down

0 comments on commit 1a194b2

Please sign in to comment.