[PATCH] pm: clear -EAGAIN in dpm_prepare

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <sebott@xxxxxxxxxxxxxxxxxx>
---
 drivers/base/power/main.c |    1 +
 1 file changed, 1 insertion(+)

Index: git.linux-2.6/drivers/base/power/main.c
===================================================================
--- git.linux-2.6.orig/drivers/base/power/main.c	2009-06-30 12:27:33.000000000 +0200
+++ git.linux-2.6/drivers/base/power/main.c	2009-06-30 12:38:26.000000000 +0200
@@ -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 "
_______________________________________________
linux-pm mailing list
linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/linux-pm

[Index of Archives]     [Linux ACPI]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [CPU Freq]     [Kernel Newbies]     [Fedora Kernel]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux