Commit 9bb9ef2b authored by Qinglang Miao's avatar Qinglang Miao Committed by Mark Brown

spi: bcm63xx-hsspi: fix missing clk_disable_unprepare() on error in bcm63xx_hsspi_resume

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: 0fd85869 ("spi/bcm63xx-hsspi: keep pll clk enabled")
Signed-off-by: default avatarQinglang Miao <miaoqinglang@huawei.com>
Link: https://lore.kernel.org/r/20201103074911.195530-1-miaoqinglang@huawei.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent a042184c
...@@ -494,8 +494,10 @@ static int bcm63xx_hsspi_resume(struct device *dev) ...@@ -494,8 +494,10 @@ static int bcm63xx_hsspi_resume(struct device *dev)
if (bs->pll_clk) { if (bs->pll_clk) {
ret = clk_prepare_enable(bs->pll_clk); ret = clk_prepare_enable(bs->pll_clk);
if (ret) if (ret) {
clk_disable_unprepare(bs->clk);
return ret; return ret;
}
} }
spi_master_resume(master); spi_master_resume(master);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment