From: Mario Limonciello <[email protected]> If a device failed to resume the PM core treats it as though it succeeded. This could cause state machine problems.
Cc: Muhammad Usama Anjum <[email protected]> Signed-off-by: Mario Limonciello (AMD) <[email protected]> --- drivers/base/power/main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c index e83503bdc1fdb..bf9c3d79c455f 100644 --- a/drivers/base/power/main.c +++ b/drivers/base/power/main.c @@ -1104,6 +1104,9 @@ static void device_resume(struct device *dev, pm_message_t state, bool async) device_unlock(dev); dpm_watchdog_clear(&wd); + if (error) + dev->power.is_suspended = true; + Complete: complete_all(&dev->power.completion); -- 2.43.0
