From: Rosen Penev <rosenp@gmail.com>
To: linux-crypto@vger.kernel.org
Cc: Srujana Challa <schalla@marvell.com>,
Bharat Bhushan <bbhushan2@marvell.com>,
Herbert Xu <herbert@gondor.apana.org.au>,
"David S. Miller" <davem@davemloft.net>,
linux-kernel@vger.kernel.org (open list)
Subject: [PATCH] crypto: cesa: clear cesa_dev on _remove
Date: Tue, 28 Jul 2026 15:42:23 -0700 [thread overview]
Message-ID: <20260728224223.82278-1-rosenp@gmail.com> (raw)
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
reply other threads:[~2026-07-28 22:42 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260728224223.82278-1-rosenp@gmail.com \
--to=rosenp@gmail.com \
--cc=bbhushan2@marvell.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=schalla@marvell.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox