Commit 63fd4b94 authored by Stefan Agner's avatar Stefan Agner Committed by Greg Kroah-Hartman
Browse files

serial: imx: fix error handling in console_setup



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: default avatarStefan Agner <stefan@agner.ch>
Reviewed-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 35d7a58a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2064,7 +2064,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;