diff options
author | Miaoqian Lin <linmq006@gmail.com> | 2022-03-07 10:51:35 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-04-15 11:08:12 +0200 |
commit | bcea0f547ec1a2ee44d429aaf0334633e386e67c (patch) | |
tree | 0e8f2c84e21ac69dcc95770823d1614e7f3540b1 | |
parent | e73b5c7f3d34c159447de0d24110f1df6d1b6615 (diff) | |
download | linux-stable-bcea0f547ec1a2ee44d429aaf0334633e386e67c.tar.gz linux-stable-bcea0f547ec1a2ee44d429aaf0334633e386e67c.tar.bz2 linux-stable-bcea0f547ec1a2ee44d429aaf0334633e386e67c.zip |
tty: serial: owl: Fix missing clk_disable_unprepare() in owl_uart_probe
Fix the missing clk_disable_unprepare() before return
from owl_uart_probe() in the error handling case.
Fixes: abf42d2f333b ("tty: serial: owl: add "much needed" clk_prepare_enable()")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Link: https://lore.kernel.org/r/20220307105135.11698-1-linmq006@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/tty/serial/owl-uart.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/tty/serial/owl-uart.c b/drivers/tty/serial/owl-uart.c index 5ff7c89aeb06..44d20e5a7dd3 100644 --- a/drivers/tty/serial/owl-uart.c +++ b/drivers/tty/serial/owl-uart.c @@ -731,6 +731,7 @@ static int owl_uart_probe(struct platform_device *pdev) owl_port->port.uartclk = clk_get_rate(owl_port->clk); if (owl_port->port.uartclk == 0) { dev_err(&pdev->dev, "clock rate is zero\n"); + clk_disable_unprepare(owl_port->clk); return -EINVAL; } owl_port->port.flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP | UPF_LOW_LATENCY; |