serial: imx: fix error handling in console_setup
authorStefan Agner <stefan@agner.ch>
Wed, 14 Nov 2018 17:49:38 +0000 (18:49 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 27 Nov 2018 08:56:20 +0000 (09:56 +0100)
The ipg clock only needs to be unprepared in case preparing
per clock fails. The ipg clock has already disabled at the point.

Fixes: 1cf93e0d5488 ("serial: imx: remove the uart_console() check")
Signed-off-by: Stefan Agner <stefan@agner.ch>
Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/imx.c

index d4e051b578f6b941207176c471dc7645c33bef69..dff75dc947311cd588437363db8578cf8f180351 100644 (file)
@@ -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;