summaryrefslogtreecommitdiff
path: root/drivers/spi
diff options
context:
space:
mode:
authorQinglang Miao <miaoqinglang@huawei.com>2020-11-03 15:49:11 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-12-30 11:25:52 +0100
commit74f92cc8b4b808e89cec017cf313bab19ba5927d (patch)
tree0e9ea4cdaf5fdc26668903a87e29a4f1ab2abf03 /drivers/spi
parent9559ee15ca124e7ebe258d5219499cb805f8c31f (diff)
spi: bcm63xx-hsspi: fix missing clk_disable_unprepare() on error in bcm63xx_hsspi_resume
[ Upstream commit 9bb9ef2b3e5d9d012876e7e2d7757eb30e865bee ] Fix the missing clk_disable_unprepare() before return from bcm63xx_hsspi_resume in the error handling case when fails to prepare and enable bs->pll_clk. Fixes: 0fd85869c2a9 ("spi/bcm63xx-hsspi: keep pll clk enabled") Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com> Link: https://lore.kernel.org/r/20201103074911.195530-1-miaoqinglang@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/spi-bcm63xx-hsspi.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/spi/spi-bcm63xx-hsspi.c b/drivers/spi/spi-bcm63xx-hsspi.c
index 1669c554ea34..2ad7b3f3666b 100644
--- a/drivers/spi/spi-bcm63xx-hsspi.c
+++ b/drivers/spi/spi-bcm63xx-hsspi.c
@@ -487,8 +487,10 @@ static int bcm63xx_hsspi_resume(struct device *dev)
if (bs->pll_clk) {
ret = clk_prepare_enable(bs->pll_clk);
- if (ret)
+ if (ret) {
+ clk_disable_unprepare(bs->clk);
return ret;
+ }
}
spi_master_resume(master);