From e7d5c7b7b1356f80432018ce2a31c86c765adf9d Mon Sep 17 00:00:00 2001 From: "Luiz Fernando N. Capitulino" Date: Mon, 12 Jun 2006 22:46:20 -0300 Subject: [PATCH] --- yaml --- r: 28394 b: refs/heads/master c: db54a53d26322e978e66482208afabaab9cd0752 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/usb/serial/usb-serial.c | 14 ++++++-------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/[refs] b/[refs] index f1d6084477ae..3c6b36595d86 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 043ea18b2e145c4c9cb3c30757a65fe0f1678a35 +refs/heads/master: db54a53d26322e978e66482208afabaab9cd0752 diff --git a/trunk/drivers/usb/serial/usb-serial.c b/trunk/drivers/usb/serial/usb-serial.c index 92c213fa9317..a30135c7cfe6 100644 --- a/trunk/drivers/usb/serial/usb-serial.c +++ b/trunk/drivers/usb/serial/usb-serial.c @@ -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; @@ -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; @@ -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; } @@ -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; }