Skip to content

Commit

Permalink
USB: serial: fix TIOCMIWAIT return value
Browse files Browse the repository at this point in the history
Fix regression introduced by commit 143d9d9 ("USB: serial: add
tiocmiwait subdriver operation") which made the ioctl operation return
ENODEV rather than ENOIOCTLCMD when a subdriver TIOCMIWAIT
implementation is missing.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Johan Hovold authored and Greg Kroah-Hartman committed Jun 5, 2013
1 parent a26f009 commit f448803
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/usb/serial/usb-serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ static int serial_ioctl(struct tty_struct *tty,
unsigned int cmd, unsigned long arg)
{
struct usb_serial_port *port = tty->driver_data;
int retval = -ENODEV;
int retval = -ENOIOCTLCMD;

dev_dbg(tty->dev, "%s - cmd 0x%.4x\n", __func__, cmd);

Expand All @@ -420,8 +420,6 @@ static int serial_ioctl(struct tty_struct *tty,
default:
if (port->serial->type->ioctl)
retval = port->serial->type->ioctl(tty, cmd, arg);
else
retval = -ENOIOCTLCMD;
}

return retval;
Expand Down

0 comments on commit f448803

Please sign in to comment.