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>
This commit is contained in:
Shubhrajyoti Datta 2021-07-13 12:18:34 +05:30 коммит произвёл Greg Kroah-Hartman
Родитель 3b0c406124
Коммит ed623dffde
1 изменённых файлов: 1 добавлений и 0 удалений

Просмотреть файл

@ -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;
}
}