linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] hwrng: omap3-rom - fix using wrong clk_disable() in omap_rom_rng_runtime_resume()
@ 2022-05-14  8:42 Yang Yingliang
  2022-05-20  6:00 ` Herbert Xu
  0 siblings, 1 reply; 2+ messages in thread
From: Yang Yingliang @ 2022-05-14  8:42 UTC (permalink / raw)
  To: linux-kernel, linux-crypto; +Cc: mpm, herbert, tony

'ddata->clk' is enabled by clk_prepare_enable(), it should be disabled
by clk_disable_unprepare().

Fixes: 8d9d4bdc495f ("hwrng: omap3-rom - Use runtime PM instead of custom functions")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
 drivers/char/hw_random/omap3-rom-rng.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/char/hw_random/omap3-rom-rng.c b/drivers/char/hw_random/omap3-rom-rng.c
index e0d77fa048fb..f06e4f95114f 100644
--- a/drivers/char/hw_random/omap3-rom-rng.c
+++ b/drivers/char/hw_random/omap3-rom-rng.c
@@ -92,7 +92,7 @@ static int __maybe_unused omap_rom_rng_runtime_resume(struct device *dev)
 
 	r = ddata->rom_rng_call(0, 0, RNG_GEN_PRNG_HW_INIT);
 	if (r != 0) {
-		clk_disable(ddata->clk);
+		clk_disable_unprepare(ddata->clk);
 		dev_err(dev, "HW init failed: %d\n", r);
 
 		return -EIO;
-- 
2.25.1


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

* Re: [PATCH -next] hwrng: omap3-rom - fix using wrong clk_disable() in omap_rom_rng_runtime_resume()
  2022-05-14  8:42 [PATCH -next] hwrng: omap3-rom - fix using wrong clk_disable() in omap_rom_rng_runtime_resume() Yang Yingliang
@ 2022-05-20  6:00 ` Herbert Xu
  0 siblings, 0 replies; 2+ messages in thread
From: Herbert Xu @ 2022-05-20  6:00 UTC (permalink / raw)
  To: Yang Yingliang; +Cc: linux-kernel, linux-crypto, mpm, tony

On Sat, May 14, 2022 at 04:42:41PM +0800, Yang Yingliang wrote:
> 'ddata->clk' is enabled by clk_prepare_enable(), it should be disabled
> by clk_disable_unprepare().
> 
> Fixes: 8d9d4bdc495f ("hwrng: omap3-rom - Use runtime PM instead of custom functions")
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
> ---
>  drivers/char/hw_random/omap3-rom-rng.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Patch applied.  Thanks.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

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

end of thread, other threads:[~2022-05-20  6:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-14  8:42 [PATCH -next] hwrng: omap3-rom - fix using wrong clk_disable() in omap_rom_rng_runtime_resume() Yang Yingliang
2022-05-20  6:00 ` Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).