[PATCH] crypto: aspeed - fix double free caused by devm
Herbert Xu
herbert at gondor.apana.org.au
Wed Oct 22 21:59:58 PDT 2025
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 <vulab at iscas.ac.cn>
> ---
> drivers/crypto/aspeed/aspeed-acry.c | 2 --
> 1 file changed, 2 deletions(-)
Patch applied. Thanks.
--
Email: Herbert Xu <herbert at gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
More information about the linux-arm-kernel
mailing list