pm: clear -EAGAIN in dpm_prepare
Subsystems (4)
PATCH 1/1 pm: clear -EAGAIN in dpm_prepare
pm: clear -EAGAIN in dpm_prepare
When the last device in the dpm list is unregistered directly after its prepare() callback returned with -EAGAIN, the return code is passed to the calling function, resulting in a resume failure. Prevent this by clearing the return code after -EAGAIN.
Signed-off-by Sebastian Ott <[email protected]>
--- drivers/base/power/main.c | 1 + 1 file changed, 1 insertion(+)
drivers/base/power/main.c +1 -0
@@ -762,6 +762,7 @@ static int dpm_prepare(pm_message_t stat dev->power.status =DPM_ON ;if (error == -EAGAIN ) {put_device (dev); + error =0 ;continue ; } printk(KERN_ERR "PM: Failed to prepare device %s "
Quoted 9 lines · Sebastian Ott
pm: clear
-EAGAINindpm_prepareWhen the last device in the dpm list is unregistered directly after its
prepare()callback returned with-EAGAIN, the return code is passed to the calling function, resulting in a resume failure. Prevent this by clearing the return code after-EAGAIN.Signed-off-by Sebastian Ott <[email protected]>---
Thanks, the patch is now in the linux-next branch of the suspend-2.6 tree.
Best,
Rafael