diff options
author | Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com> | 2021-07-13 08:48:34 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-07-21 12:46:52 +0200 |
commit | ed623dffdeebcc0acac7be6af4a301ee7169cd21 (patch) | |
tree | 5747d94bbdcc9a4ac8dfcb26f4edffd55267f4fd | |
parent | tty: Fix out-of-bound vmalloc access in imageblit (diff) | |
download | linux-ed623dffdeebcc0acac7be6af4a301ee7169cd21.tar.xz linux-ed623dffdeebcc0acac7be6af4a301ee7169cd21.zip |
tty: serial: uartlite: Disable clocks in case of errors
In case the uart registration fails the clocks are left enabled.
Disable the clock in case of errors.
Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Link: https://lore.kernel.org/r/20210713064835.27978-2-shubhrajyoti.datta@xilinx.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/tty/serial/uartlite.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/tty/serial/uartlite.c b/drivers/tty/serial/uartlite.c index a5f15f22d9ef..0376c8607e89 100644 --- a/drivers/tty/serial/uartlite.c +++ b/drivers/tty/serial/uartlite.c @@ -784,6 +784,7 @@ static int ulite_probe(struct platform_device *pdev) ret = uart_register_driver(&ulite_uart_driver); if (ret < 0) { dev_err(&pdev->dev, "Failed to register driver\n"); + clk_disable_unprepare(pdata->clk); return ret; } } |