Skip to content

Commit bcea0f5

Browse files
Yuuoniygregkh
authored andcommitted
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: abf42d2 ("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>
1 parent e73b5c7 commit bcea0f5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/tty/serial/owl-uart.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -731,6 +731,7 @@ static int owl_uart_probe(struct platform_device *pdev)
731731
owl_port->port.uartclk = clk_get_rate(owl_port->clk);
732732
if (owl_port->port.uartclk == 0) {
733733
dev_err(&pdev->dev, "clock rate is zero\n");
734+
clk_disable_unprepare(owl_port->clk);
734735
return -EINVAL;
735736
}
736737
owl_port->port.flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP | UPF_LOW_LATENCY;

0 commit comments

Comments
 (0)