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>
Sat, 21 Dec 2019 09:41:10 +0000 (10:41 +0100)
commit317bddbcf375f2a567b0fd4faa693241fc3e2169
tree8548845534a758a606c25ed181a69a884771203d
parente490a04c4a91da62ae67235f4e7a586534562ee8
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: 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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/tty/serial/imx.c