Pali Rohár ecd6b010d8 serial: mvebu-uart: do not allow changing baudrate when uartclk is not available
Testing mvuart->clk for non-error is not enough as mvuart->clk may contain
valid clk pointer but when clk_prepare_enable(mvuart->clk) failed then
port->uartclk is zero.

When mvuart->clk is not available then port->uartclk is zero too.

Parent clock rate port->uartclk is needed to calculate UART clock divisor
and without it is not possible to change baudrate.

So fix test condition when it is possible to change baudrate.

Signed-off-by: Pali Rohár <pali@kernel.org>
Fixes: 68a0db1d7da2 ("serial: mvebu-uart: add function to change baudrate")
Link: https://lore.kernel.org/r/20210624224909.6350-3-pali@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-25 13:53:20 +02:00
..
2021-04-05 08:59:21 +02:00
2020-10-28 13:39:14 +01:00
2020-07-20 09:39:11 +02:00
2021-05-31 09:44:28 +02:00
2021-04-22 12:09:25 +02:00
2020-08-18 13:51:18 +02:00
2019-12-18 15:04:57 +01:00
2020-01-29 10:13:27 -08:00