diff mbox series

[22/24] USB: serial: ftdi_sio: ignore baud_base changes

Message ID 20210407103925.829-23-johan@kernel.org (mailing list archive)
State Accepted
Commit 9378379b15e3bab6915193874e1ac4464f36d869
Headers show
Series USB: serial: TIOCSSERIAL fixes and generic support | expand

Commit Message

Johan Hovold April 7, 2021, 10:39 a.m. UTC
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.

Signed-off-by: Johan Hovold <johan@kernel.org>
---
 drivers/usb/serial/ftdi_sio.c | 4 ----
 1 file changed, 4 deletions(-)
diff mbox series

Patch

diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
index 16d3e50487e6..3fd7875200b9 100644
--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -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! */