[PATCH v1] PM: sleep: core: Fix runtime PM enabling in device_resume_early()

Rose Wu ya-jou.wu at mediatek.com
Tue Nov 18 00:31:08 PST 2025


Hi,

On Mon, 2025-11-17 at 19:57 +0100, Rafael J. Wysocki wrote:
> 
> Make two changes to address this problem.
> 
> First, reorder device_suspend_late() to only disable runtime PM for a
> device if the power.is_late_suspended flag is going to be set for it.
> In all of the other cases, disabling runtime PM for the device is not
> in fact necessary.
> 
> Second, make device_resume_early() only enable runtime PM for the
> devices with the power.is_late_suspended flag set.
> 

My concern is with the error path in device_suspend_late().
If a device fails its dpm_run_callback(), it appears that its
power.is_late_suspended flag is not set, potentially leaving its runtime
PM disabled during the resume sequence.

Regards,
Rose


More information about the Linux-mediatek mailing list