summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbui duc phuc <phucduc.bui@gmail.com>2026-09-22 10:20:54 +0700
committerHerbert Xu <herbert@gondor.apana.org.au>2026-10-02 18:12:43 +1000
commitedf73c9922672ff94ca12162829ea178685430fd (patch)
tree455d28f8c4a55cabab48f3bf2aee1ef54d74203e
parent627934a5d280c84c51a9dc5ff602324fb63a773a (diff)
hwrng: omap3-rom - Use pm_runtime_resume_and_get()
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> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-rw-r--r--drivers/char/hw_random/omap3-rom-rng.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/char/hw_random/omap3-rom-rng.c b/drivers/char/hw_random/omap3-rom-rng.c
index aa71f61c3dc9..0797add0d782 100644
--- a/drivers/char/hw_random/omap3-rom-rng.c
+++ b/drivers/char/hw_random/omap3-rom-rng.c
@@ -42,12 +42,9 @@ static int omap3_rom_rng_read(struct hwrng *rng, void *data, size_t max, bool w)
ddata = (struct omap_rom_rng *)rng->priv;
- r = pm_runtime_get_sync(ddata->dev);
- if (r < 0) {
- pm_runtime_put_noidle(ddata->dev);
-
+ r = pm_runtime_resume_and_get(ddata->dev);
+ if (r < 0)
return r;
- }
ptr = virt_to_phys(data);
r = ddata->rom_rng_call(ptr, 4, RNG_GEN_HW);