serial: tegra: Add missing clk_disable_unprepare() in tegra_uart_hw_init()
authorYi Yang <yiyang13@huawei.com>
Sat, 26 Nov 2022 02:08:52 +0000 (10:08 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Mar 2023 08:33:32 +0000 (09:33 +0100)
commitd9b85a205d95c82ac0a84e44b5a05ce9b8b0fddc
tree86426a69d0d22d544f16b2d1220c427ff7279120
parent64096d3b8d1158c4409d06cb36fd8d42dd69e1bb
serial: tegra: Add missing clk_disable_unprepare() in tegra_uart_hw_init()

[ Upstream commit 38f28cfe9d08e3a47ef008798b275fef8118fc20 ]

Add the missing clk_disable_unprepare() before return from
tegra_uart_hw_init() in the error handling path.
When request_irq() fails in tegra_uart_startup(), 'tup->uart_clk'
has been enabled, fix it by adding clk_disable_unprepare().

Fixes: cc9ca4d95846 ("serial: tegra: Only print FIFO error message when an error occurs")
Fixes: d781ec21bae6 ("serial: tegra: report clk rate errors")
Signed-off-by: Yi Yang <yiyang13@huawei.com>
Link: https://lore.kernel.org/r/20221126020852.113378-1-yiyang13@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/tty/serial/serial-tegra.c