Thread (2 messages) 2 messages, 2 authors, 2025-10-23

Re: [PATCH] crypto: aspeed - fix double free caused by devm

From: Herbert Xu <herbert@gondor.apana.org.au>
Date: 2025-10-23 05:00:21
Also in: linux-aspeed, linux-crypto, lkml

On Mon, Oct 20, 2025 at 06:11:09PM +0800, Haotian Zhang wrote:
The clock obtained via devm_clk_get_enabled() is automatically managed
by devres and will be disabled and freed on driver detach. Manually
calling clk_disable_unprepare() in error path and remove function
causes double free.

Remove the manual clock cleanup in both aspeed_acry_probe()'s error
path and aspeed_acry_remove().

Fixes: 2f1cf4e50c95 ("crypto: aspeed - Add ACRY RSA driver")
Signed-off-by: Haotian Zhang <redacted>
---
 drivers/crypto/aspeed/aspeed-acry.c | 2 --
 1 file changed, 2 deletions(-)
Patch applied.  Thanks.
-- 
Email: Herbert Xu [off-list ref]
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help