提交 ed623dff 编写于 作者: S Shubhrajyoti Datta 提交者: Greg Kroah-Hartman

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: NShubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Link: https://lore.kernel.org/r/20210713064835.27978-2-shubhrajyoti.datta@xilinx.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 3b0c4061
......@@ -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;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册