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>
This commit is contained in:
parent
a26f009a07
commit
f4488035ab
1 changed files with 1 additions and 3 deletions
|
@ -408,7 +408,7 @@ static int serial_ioctl(struct tty_struct *tty,
|
||||||
unsigned int cmd, unsigned long arg)
|
unsigned int cmd, unsigned long arg)
|
||||||
{
|
{
|
||||||
struct usb_serial_port *port = tty->driver_data;
|
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);
|
dev_dbg(tty->dev, "%s - cmd 0x%.4x\n", __func__, cmd);
|
||||||
|
|
||||||
|
@ -420,8 +420,6 @@ static int serial_ioctl(struct tty_struct *tty,
|
||||||
default:
|
default:
|
||||||
if (port->serial->type->ioctl)
|
if (port->serial->type->ioctl)
|
||||||
retval = port->serial->type->ioctl(tty, cmd, arg);
|
retval = port->serial->type->ioctl(tty, cmd, arg);
|
||||||
else
|
|
||||||
retval = -ENOIOCTLCMD;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return retval;
|
return retval;
|
||||||
|
|
Loading…
Add table
Reference in a new issue