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>
This commit is contained in:
bui duc phuc 2026-09-22 10:20:54 +07:00 committed by Herbert Xu
parent 627934a5d2
commit edf73c9922

View File

@ -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);