diff options
author | Wei Yongjun <weiyongjun1@huawei.com> | 2018-07-11 09:18:59 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2018-07-11 10:34:53 -0400 |
commit | 2ba87a9bcc7a10aa28af9fbf5b4354b3168366e2 (patch) | |
tree | 5db21c2b3f905e82716335873b92a57997a10c7e | |
parent | 8570043e2cc659f375336fb8141917ca1b050234 (diff) |
spi: cadence: Fix missing clk_disable_unprepare() on error in cnds_runtime_resume()
Fix the missing clk_disable_unprepare() before return
from cnds_runtime_resume() in the error handling case.
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | drivers/spi/spi-cadence.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/spi/spi-cadence.c b/drivers/spi/spi-cadence.c index a568f35522f9..7c88f74f7f47 100644 --- a/drivers/spi/spi-cadence.c +++ b/drivers/spi/spi-cadence.c | |||
@@ -739,7 +739,7 @@ static int __maybe_unused cnds_runtime_resume(struct device *dev) | |||
739 | ret = clk_prepare_enable(xspi->ref_clk); | 739 | ret = clk_prepare_enable(xspi->ref_clk); |
740 | if (ret) { | 740 | if (ret) { |
741 | dev_err(dev, "Cannot enable device clock.\n"); | 741 | dev_err(dev, "Cannot enable device clock.\n"); |
742 | clk_disable(xspi->pclk); | 742 | clk_disable_unprepare(xspi->pclk); |
743 | return ret; | 743 | return ret; |
744 | } | 744 | } |
745 | return 0; | 745 | return 0; |