summaryrefslogtreecommitdiff
path: root/drivers/tty
diff options
context:
space:
mode:
authorHugo Villeneuve <hvilleneuve@dimonoff.com>2026-04-10 11:20:10 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-05-11 17:19:52 +0200
commit888b245964ad3617866d6d4b5bb8a154a410ef32 (patch)
tree0bef73c645ddb65930fd3fe9f2da569d786fb538 /drivers/tty
parentba48a6b91f54ad4ad1b9b8ed5878ee17a18e0f38 (diff)
serial: apbuart: remove check for zero baud rate from uart_get_baud_rate()
The minimum baud rate supported by this driver is 0, 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-3-hugo@hugovil.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/apbuart.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/tty/serial/apbuart.c b/drivers/tty/serial/apbuart.c
index 3e46341cfff8..afb04d727203 100644
--- a/drivers/tty/serial/apbuart.c
+++ b/drivers/tty/serial/apbuart.c
@@ -210,8 +210,6 @@ static void apbuart_set_termios(struct uart_port *port,
/* Ask the core to calculate the divisor for us. */
baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk / 16);
- if (baud == 0)
- panic("invalid baudrate %i\n", port->uartclk / 16);
/* uart_get_divisor calc a *16 uart freq, apbuart is *8 */
quot = (uart_get_divisor(port, baud)) * 2;