Skip to content

Commit

Permalink
spi: bcm63xx-hsspi: fix missing clk_disable_unprepare() on error in b…
Browse files Browse the repository at this point in the history
…cm63xx_hsspi_resume

[ Upstream commit 9bb9ef2 ]

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: 0fd8586 ("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>
  • Loading branch information
Qinglang Miao authored and gregkh committed Dec 30, 2020
1 parent d7dc725 commit b8c65a7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/spi/spi-bcm63xx-hsspi.c
Expand Up @@ -494,8 +494,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);
Expand Down

0 comments on commit b8c65a7

Please sign in to comment.