* [PATCH] crypto: cesa: clear cesa_dev on _remove
@ 2026-07-28 22:42 Rosen Penev
0 siblings, 0 replies; only message in thread
From: Rosen Penev @ 2026-07-28 22:42 UTC (permalink / raw)
To: linux-crypto
Cc: Srujana Challa, Bharat Bhushan, Herbert Xu, David S. Miller,
open list
This is already done on probe failure.
cesa_dev should be set to NULL as the driver checks that it is not and
errors saying that only one device is authorized.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
drivers/crypto/marvell/cesa/cesa.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/crypto/marvell/cesa/cesa.c b/drivers/crypto/marvell/cesa/cesa.c
index 75d8ba23d9a2..f0da4676b15f 100644
--- a/drivers/crypto/marvell/cesa/cesa.c
+++ b/drivers/crypto/marvell/cesa/cesa.c
@@ -527,13 +527,11 @@ static int mv_cesa_probe(struct platform_device *pdev)
INIT_LIST_HEAD(&engine->complete_queue);
}
- cesa_dev = cesa;
-
ret = mv_cesa_add_algs(cesa);
- if (ret) {
- cesa_dev = NULL;
+ if (ret)
goto err_cleanup;
- }
+
+ cesa_dev = cesa;
dev_info(dev, "CESA device successfully registered\n");
@@ -551,6 +549,8 @@ static void mv_cesa_remove(struct platform_device *pdev)
struct mv_cesa_dev *cesa = platform_get_drvdata(pdev);
int i;
+ cesa_dev = NULL;
+
mv_cesa_remove_algs(cesa);
for (i = 0; i < cesa->caps->nengines; i++)
--
2.55.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-07-28 22:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-28 22:42 [PATCH] crypto: cesa: clear cesa_dev on _remove Rosen Penev
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox