USB: serial: ftdi_sio: ignore baud_base changes
authorJohan Hovold <johan@kernel.org>
Wed, 7 Apr 2021 10:39:23 +0000 (12:39 +0200)
committerJohan Hovold <johan@kernel.org>
Thu, 8 Apr 2021 07:46:03 +0000 (09:46 +0200)
The TIOCSSERIAL error handling is inconsistent at best, but drivers tend
to ignore requests to change parameters which cannot be changed rather
than return an error.

The FTDI driver ignores change requests for all immutable parameters but
baud_base so return success also in this case for consistency.

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
drivers/usb/serial/ftdi_sio.c

index 16d3e50..3fd7875 100644 (file)
@@ -1509,10 +1509,6 @@ static int set_serial_info(struct tty_struct *tty,
                goto check_and_exit;
        }
 
-       if (ss->baud_base != priv->baud_base) {
-               mutex_unlock(&priv->cfg_lock);
-               return -EINVAL;
-       }
 
        /* Make the changes - these are privileged changes! */