diff options
author | Johan Hovold <jhovold@gmail.com> | 2012-01-10 17:33:37 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2012-01-24 14:20:10 -0500 |
commit | eb833a9e0972f60beb4ab8104ad7ef6bf30f02fc (patch) | |
tree | e0de114cb5ad208618508f5dae5c8cc5ef7aa571 /drivers/usb/serial/ftdi_sio.c | |
parent | 55305afc30529143bdb5928b2154dccdf073acd5 (diff) |
USB: ftdi_sio: fix TIOCSSERIAL baud_base handling
Return EINVAL if new baud_base does not match the current one.
The baud_base is device specific and can not be changed. This restores
the old (pre-2005) behaviour which was changed due to a
misunderstanding regarding this fact (see
https://lkml.org/lkml/2005/1/20/84).
Reported-by: Torbjörn Lofterud <torbjorn@pi.nxs.se>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/serial/ftdi_sio.c')
-rw-r--r-- | drivers/usb/serial/ftdi_sio.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index 01b6404df395..ff5a8e172a34 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c | |||
@@ -1333,8 +1333,7 @@ static int set_serial_info(struct tty_struct *tty, | |||
1333 | goto check_and_exit; | 1333 | goto check_and_exit; |
1334 | } | 1334 | } |
1335 | 1335 | ||
1336 | if ((new_serial.baud_base != priv->baud_base) && | 1336 | if (new_serial.baud_base != priv->baud_base) { |
1337 | (new_serial.baud_base < 9600)) { | ||
1338 | mutex_unlock(&priv->cfg_lock); | 1337 | mutex_unlock(&priv->cfg_lock); |
1339 | return -EINVAL; | 1338 | return -EINVAL; |
1340 | } | 1339 | } |