Re: [PATCH] hwrng: stm32 - Fix runtime PM cleanup on registration failure
Linus Walleij <[email protected]> Sat, 25 Jul 2026 11:10:20 +0200
| Newsgroups | org.kernel.vger.linux-crypto,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-kernel,org.kernel.vger.stable |
|---|---|
| Message-ID | <CAD++jLke1q2DX1EQTHysPKrvy8mtnFtbnLwfQ-wEvRE2MNsECA@mail.gmail.com> |
Hi Can, thanks for your patch! On Sat, Jul 18, 2026 at 5:30 AM Can Peng <[email protected]> wrote: > stm32_rng_probe() enables autosuspend and runtime PM before registering the > hwrng. If devm_hwrng_register() fails, probe returns with runtime PM left > enabled and autosuspend still selected. > > The remove callback also only disables runtime PM and does not undo > pm_runtime_use_autosuspend(). > > Use devm_pm_runtime_enable() so runtime PM is unwound automatically on > probe failure and driver detach. Since the managed cleanup also disables > runtime PM,drop the remove callback. > > Fixes: c6a97c42e399 ("hwrng: stm32 - add support for STM32 HW RNG") > Cc: [email protected] Ah come on, it's not that serious. > Signed-off-by: Can Peng <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Yours, Linus Walleij