Message ID | d71e0bcee781ebe12697df94083f16d651fb30c0.1732786634.git.xiaopei01@kylinos.cn |
---|---|
State | New |
Headers | show |
Series | hwrng: cctrng: Add cancel_work_sync before module remove | expand |
diff --git a/drivers/char/hw_random/cctrng.c b/drivers/char/hw_random/cctrng.c index 4db198849695..fd1ee3687782 100644 --- a/drivers/char/hw_random/cctrng.c +++ b/drivers/char/hw_random/cctrng.c @@ -127,6 +127,8 @@ static void cc_trng_pm_fini(struct cctrng_drvdata *drvdata) { struct device *dev = &(drvdata->pdev->dev); + cancel_work_sync(&drvdata->compwork); + cancel_work_sync(&drvdata->startwork); pm_runtime_disable(dev); }
Be ensured that the work is canceled before proceeding with the cleanup in cc_trng_pm_fini. Fixes: a583ed310bb6 ("hwrng: cctrng - introduce Arm CryptoCell driver") Signed-off-by: Pei Xiao <xiaopei01@kylinos.cn> --- drivers/char/hw_random/cctrng.c | 2 ++ 1 file changed, 2 insertions(+)