[PATCH] serial: rsci: remove check for zero baud rate from uart_get_baud_rate()

Hugo Villeneuve posted 1 patch 4 days, 5 hours ago
drivers/tty/serial/rsci.c | 3 ---
1 file changed, 3 deletions(-)
[PATCH] serial: rsci: remove check for zero baud rate from uart_get_baud_rate()
Posted by Hugo Villeneuve 4 days, 5 hours ago
From: Hugo Villeneuve <hvilleneuve@dimonoff.com>

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 is no
longer necessary since commit 16ae2a877bf4 ("serial: Fix crash if the
minimum rate of the device is > 9600 baud") so remove it.

Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
---
Cc: biju.das.au <biju.das.au@gmail.com>
---
 drivers/tty/serial/rsci.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/tty/serial/rsci.c b/drivers/tty/serial/rsci.c
index b00c9e385169d..40db9daa4272d 100644
--- a/drivers/tty/serial/rsci.c
+++ b/drivers/tty/serial/rsci.c
@@ -265,8 +265,6 @@ static void rsci_set_termios(struct uart_port *port, struct ktermios *termios,
 	}
 
 	baud = uart_get_baud_rate(port, termios, old, 0, max_freq);
-	if (!baud)
-		goto done;
 
 	/* Divided Functional Clock using standard Bit Rate Register */
 	err = sci_scbrr_calc(s, baud, &brr1, &srr1, &cks1);
@@ -278,7 +276,6 @@ static void rsci_set_termios(struct uart_port *port, struct ktermios *termios,
 		cks = cks1;
 	}
 
-done:
 	if (best_clk >= 0)
 		dev_dbg(port->dev, "Using clk %pC for %u%+d bps\n",
 			s->clks[best_clk], baud, min_err);

base-commit: 782f4dbd1794b4f30dc116a7ca42c5962c409be8
-- 
2.47.3