[PATCH 01/13] hwrng: cctrng: Discard pm_runtime_put_autosuspend() return value
From: Brian Norris
Date: Tue Oct 06 2026 - 19:20:51 EST
Printing an error message on pm_runtime_put_autosuspend() returning a
non-zero value is not particularly useful.
Returning an error code from pm_runtime_put_autosuspend() merely means
that it has not queued up a timer or work item to check whether or not
the device can be suspended and there are many perfectly valid
situations in which that can happen, like after writing "on" to the
device's runtime PM "control" attribute in sysfs for one example.
Accordingly, update cc_trng_pm_put_suspend() to simply discard the
return value of pm_runtime_put_autosuspend().
This will facilitate a planned change of the
pm_runtime_put_autosuspend() return type to void in the future, similar
to commit 3afd8df02433 ("PM: runtime: Change pm_runtime_put() return
type to void").
Signed-off-by: Brian Norris <briannorris@xxxxxxxxxxxx>
---
This patch is independent of the rest of the series, except for the end
(changing the return type). I expect it can be applied by individual
maintainers, and we pick up the end once the dust is settled.
drivers/char/hw_random/cctrng.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/char/hw_random/cctrng.c b/drivers/char/hw_random/cctrng.c
index a6925211c3b5..7e1e1a7844b0 100644
--- a/drivers/char/hw_random/cctrng.c
+++ b/drivers/char/hw_random/cctrng.c
@@ -96,11 +96,7 @@ static int cc_trng_pm_get(struct device *dev)
static void cc_trng_pm_put_suspend(struct device *dev)
{
- int rc = 0;
-
- rc = pm_runtime_put_autosuspend(dev);
- if (rc)
- dev_err(dev, "pm_runtime_put_autosuspend returned %x\n", rc);
+ pm_runtime_put_autosuspend(dev);
}
static int cc_trng_pm_init(struct cctrng_drvdata *drvdata)
--
2.56.0.360.g66cac248cb-goog