All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] spi: cadence: Fix missing clk_disable_unprepare() on error in cnds_runtime_resume()
@ 2018-07-11 13:18 Wei Yongjun
  0 siblings, 0 replies; only message in thread
From: Wei Yongjun @ 2018-07-11 13:18 UTC (permalink / raw)
  To: kernel-janitors

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>
---
 drivers/spi/spi-cadence.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/spi-cadence.c b/drivers/spi/spi-cadence.c
index a568f35..7c88f74 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)
 	ret = clk_prepare_enable(xspi->ref_clk);
 	if (ret) {
 		dev_err(dev, "Cannot enable device clock.\n");
-		clk_disable(xspi->pclk);
+		clk_disable_unprepare(xspi->pclk);
 		return ret;
 	}
 	return 0;




^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2018-07-11 13:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-11 13:18 [PATCH -next] spi: cadence: Fix missing clk_disable_unprepare() on error in cnds_runtime_resume() Wei Yongjun

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.