From: phucduc.bui@gmail.com
To: Corentin Labbe <clabbe.montjoie@gmail.com>,
Herbert Xu <herbert@gondor.apana.org.au>,
davem@davemloft.net, Chen-Yu Tsai <wens@kernel.org>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
Samuel Holland <samuel@sholland.org>,
Gilad Ben-Yossef <gilad@benyossef.com>,
Hans Ulli Kroll <ulli.kroll@googlemail.com>,
Linus Walleij <linusw@kernel.org>,
linux-crypto@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Cc: linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org,
bui duc phuc <phucduc.bui@gmail.com>
Subject: [PATCH 2/3] crypto: ccree - Use pm_runtime_resume_and_get()
Date: Tue, 22 Sep 2026 10:19:53 +0700 [thread overview]
Message-ID: <20260922031954.320895-3-phucduc.bui@gmail.com> (raw)
In-Reply-To: <20260922031954.320895-1-phucduc.bui@gmail.com>
From: bui duc phuc <phucduc.bui@gmail.com>
Replace the open-coded pm_runtime_get_sync() + pm_runtime_put_noidle()
error handling pattern with pm_runtime_resume_and_get(), which already
does this internally.
No functional change.
Found by manual code inspection.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
drivers/crypto/ccree/cc_pm.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/crypto/ccree/cc_pm.c b/drivers/crypto/ccree/cc_pm.c
index bbd118f8de0e..666866119588 100644
--- a/drivers/crypto/ccree/cc_pm.c
+++ b/drivers/crypto/ccree/cc_pm.c
@@ -66,13 +66,7 @@ const struct dev_pm_ops ccree_pm = {
int cc_pm_get(struct device *dev)
{
- int rc = pm_runtime_get_sync(dev);
- if (rc < 0) {
- pm_runtime_put_noidle(dev);
- return rc;
- }
-
- return 0;
+ return pm_runtime_resume_and_get(dev);
}
void cc_pm_put_suspend(struct device *dev)
--
2.43.0
next prev parent reply other threads:[~2026-09-22 3:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-22 3:19 [PATCH 0/3] crypto: " phucduc.bui
2026-09-22 3:19 ` [PATCH 1/3] crypto: sun8i-ss - " phucduc.bui
2026-09-22 3:19 ` phucduc.bui [this message]
2026-09-22 3:19 ` [PATCH 3/3] crypto: sl3516 " phucduc.bui
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=20260922031954.320895-3-phucduc.bui@gmail.com \
--to=phucduc.bui@gmail.com \
--cc=clabbe.montjoie@gmail.com \
--cc=davem@davemloft.net \
--cc=gilad@benyossef.com \
--cc=herbert@gondor.apana.org.au \
--cc=jernej.skrabec@gmail.com \
--cc=linusw@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sunxi@lists.linux.dev \
--cc=samuel@sholland.org \
--cc=ulli.kroll@googlemail.com \
--cc=wens@kernel.org \
/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
all inboxes | Powered by JetHome®