Linux cryptographic layer development
 help / color / mirror / Atom feed
* [PATCH -next] hwrng: atmel - use clk_disable_unprepare instead of clk_disable
@ 2016-11-11 14:56 Wei Yongjun
  2016-11-14  8:02 ` Nicolas Ferre
  0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2016-11-11 14:56 UTC (permalink / raw)
  To: Matt Mackall, Herbert Xu, Wenyou Yang, Nicolas Ferre
  Cc: Wei Yongjun, linux-crypto

From: Wei Yongjun <weiyongjun1@huawei.com>

Since clk_prepare_enable() is used to get trng->clk, we should
use clk_disable_unprepare() to release it for the error path.

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/char/hw_random/atmel-rng.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/char/hw_random/atmel-rng.c b/drivers/char/hw_random/atmel-rng.c
index ae7cae5..661c82c 100644
--- a/drivers/char/hw_random/atmel-rng.c
+++ b/drivers/char/hw_random/atmel-rng.c
@@ -94,7 +94,7 @@ static int atmel_trng_probe(struct platform_device *pdev)
 	return 0;
 
 err_register:
-	clk_disable(trng->clk);
+	clk_disable_unprepare(trng->clk);
 	return ret;
 }

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-11-14  8:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-11 14:56 [PATCH -next] hwrng: atmel - use clk_disable_unprepare instead of clk_disable Wei Yongjun
2016-11-14  8:02 ` Nicolas Ferre

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox