spi: cadence-quadspi: add missing clk_disable_unprepare() in cqspi_probe()
authorYang Yingliang <yangyingliang@huawei.com>
Wed, 29 Nov 2023 08:11:47 +0000 (16:11 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Jan 2024 23:35:14 +0000 (15:35 -0800)
commitb1432249f169279e6fd07e9eaacece1561aca1bd
tree315bde9d16603d5e595fdf2c0fca536a4bbc496c
parent69c2d6e40d97ecc5dbb2f4db9a255b121809b3ac
spi: cadence-quadspi: add missing clk_disable_unprepare() in cqspi_probe()

[ Upstream commit 5cb475174cce1bfedf1025b6e235e2c43d81144f ]

cqspi_jh7110_clk_init() is called after clk_prepare_enable(cqspi->clk),
if it fails, it should goto label 'probe_reset_failed' to disable
cqspi->clk.

In the error path after calling cqspi_jh7110_clk_init(),
cqspi_jh7110_disable_clk() need be called.

Fixes: 33f1ef6d4eb6 ("spi: cadence-quadspi: Add clock configuration for StarFive JH7110 QSPI")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20231129081147.628004-1-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/spi/spi-cadence-quadspi.c