dect
/
linux-2.6
Archived
13
0
Fork 0

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>
This commit is contained in:
Johan Hovold 2012-01-10 23:33:37 +01:00 committed by Greg Kroah-Hartman
parent 55305afc30
commit eb833a9e09
1 changed files with 1 additions and 2 deletions

View File

@ -1333,8 +1333,7 @@ static int set_serial_info(struct tty_struct *tty,
goto check_and_exit;
}
if ((new_serial.baud_base != priv->baud_base) &&
(new_serial.baud_base < 9600)) {
if (new_serial.baud_base != priv->baud_base) {
mutex_unlock(&priv->cfg_lock);
return -EINVAL;
}