]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
hwrng: cctrng - Add missing clk_disable_unprepare in cctrng_resume
authorGaosheng Cui <cuigaosheng1@huawei.com>
Sat, 3 Aug 2024 06:49:23 +0000 (14:49 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Oct 2024 14:29:55 +0000 (16:29 +0200)
commit 4b7acc85de14ee8a2236f54445dc635d47eceac0 upstream.

Add the missing clk_disable_unprepare() before return in
cctrng_resume().

Fixes: a583ed310bb6 ("hwrng: cctrng - introduce Arm CryptoCell driver")
Cc: <stable@vger.kernel.org>
Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/char/hw_random/cctrng.c

index 1abbff04a015a5a863ef40f984e02829d399747c..a55f5f2d35dff75ce0d2b1ae397fd37b52159828 100644 (file)
@@ -624,6 +624,7 @@ static int __maybe_unused cctrng_resume(struct device *dev)
        /* wait for Cryptocell reset completion */
        if (!cctrng_wait_for_reset_completion(drvdata)) {
                dev_err(dev, "Cryptocell reset not completed");
+               clk_disable_unprepare(drvdata->clk);
                return -EBUSY;
        }