提交 33b629d4 编写于 作者: S Stefan Agner 提交者: Greg Kroah-Hartman

serial: imx: fix error handling in console_setup

[ Upstream commit 63fd4b94b948c14eeb27a3bbf50ea0f7f0593bad ]

The ipg clock only needs to be unprepared in case preparing
per clock fails. The ipg clock has already disabled at the point.

Fixes: 1cf93e0d ("serial: imx: remove the uart_console() check")
Signed-off-by: NStefan Agner <stefan@agner.ch>
Reviewed-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NSasha Levin <sashal@kernel.org>
上级 f6ea3c03
......@@ -2071,7 +2071,7 @@ imx_uart_console_setup(struct console *co, char *options)
retval = clk_prepare(sport->clk_per);
if (retval)
clk_disable_unprepare(sport->clk_ipg);
clk_unprepare(sport->clk_ipg);
error_console:
return retval;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册