diff options
author | Johan Hovold <jhovold@gmail.com> | 2013-06-05 06:21:11 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-06-05 11:34:42 -0400 |
commit | f4488035abdac56682153aa0cff3d1dce84e1c54 (patch) | |
tree | 4bb1548ed7b57f1a8c7a12bde50c999a8fb3c4a2 /drivers/usb | |
parent | a26f009a070e840fadacb91013b2391ba7ab6cc2 (diff) |
USB: serial: fix TIOCMIWAIT return value
Fix regression introduced by commit 143d9d9616 ("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>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/serial/usb-serial.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c index 4753c005cfb6..5f6b1ff9d29e 100644 --- a/drivers/usb/serial/usb-serial.c +++ b/drivers/usb/serial/usb-serial.c | |||
@@ -408,7 +408,7 @@ static int serial_ioctl(struct tty_struct *tty, | |||
408 | unsigned int cmd, unsigned long arg) | 408 | unsigned int cmd, unsigned long arg) |
409 | { | 409 | { |
410 | struct usb_serial_port *port = tty->driver_data; | 410 | struct usb_serial_port *port = tty->driver_data; |
411 | int retval = -ENODEV; | 411 | int retval = -ENOIOCTLCMD; |
412 | 412 | ||
413 | dev_dbg(tty->dev, "%s - cmd 0x%.4x\n", __func__, cmd); | 413 | dev_dbg(tty->dev, "%s - cmd 0x%.4x\n", __func__, cmd); |
414 | 414 | ||
@@ -420,8 +420,6 @@ static int serial_ioctl(struct tty_struct *tty, | |||
420 | default: | 420 | default: |
421 | if (port->serial->type->ioctl) | 421 | if (port->serial->type->ioctl) |
422 | retval = port->serial->type->ioctl(tty, cmd, arg); | 422 | retval = port->serial->type->ioctl(tty, cmd, arg); |
423 | else | ||
424 | retval = -ENOIOCTLCMD; | ||
425 | } | 423 | } |
426 | 424 | ||
427 | return retval; | 425 | return retval; |