]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
serial: icom: remove check for zero baud rate from uart_get_baud_rate()
authorHugo Villeneuve <hvilleneuve@dimonoff.com>
Fri, 10 Apr 2026 15:20:09 +0000 (11:20 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 11 May 2026 15:19:52 +0000 (17:19 +0200)
The minimum baud rate supported by this driver is 300, so even for the B0
case, uart_get_baud_rate() will return 9600, not zero. This check predates
commit 16ae2a877bf4 ("serial: Fix crash if the minimum rate of the device
is > 9600 baud") and is no longer necessary so remove it.

Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
Link: https://patch.msgid.link/20260410152022.2146488-2-hugo@hugovil.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/icom.c

index bcdc072084860a13eda303b68934e674b6db860f..b6399d86a0bc336c338f001d9fcaa332b79d4304 100644 (file)
@@ -1396,8 +1396,6 @@ static void icom_set_termios(struct uart_port *port, struct ktermios *termios,
        baud = uart_get_baud_rate(port, termios, old_termios,
                                  icom_acfg_baud[0],
                                  icom_acfg_baud[BAUD_TABLE_LIMIT]);
-       if (!baud)
-               baud = 9600;    /* B0 transition handled in rs_set_termios */
 
        for (index = 0; index < BAUD_TABLE_LIMIT; index++) {
                if (icom_acfg_baud[index] == baud) {