From edf73c9922672ff94ca12162829ea178685430fd Mon Sep 17 00:00:00 2001 From: bui duc phuc Date: Tue, 22 Sep 2026 10:20:54 +0700 Subject: 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 Signed-off-by: Herbert Xu --- drivers/char/hw_random/omap3-rom-rng.c | 7 ++----- 1 file 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); -- cgit v1.2.3