From: Sebastian Ott Date: Wed, 8 Jul 2009 11:26:05 +0000 (+0200) Subject: PM: Clear -EAGAIN in dpm_prepare X-Git-Tag: v2.6.31-rc3~52^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=886a7a3371da8ee46a13f8e598a536bd8765b837;p=profile%2Fivi%2Fkernel-x86-ivi.git 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 suspend failure. Prevent this by clearing the return code after -EAGAIN. Signed-off-by: Sebastian Ott Signed-off-by: Rafael J. Wysocki --- diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c index fae7254..58a3e57 100644 --- a/drivers/base/power/main.c +++ b/drivers/base/power/main.c @@ -762,6 +762,7 @@ static int dpm_prepare(pm_message_t state) dev->power.status = DPM_ON; if (error == -EAGAIN) { put_device(dev); + error = 0; continue; } printk(KERN_ERR "PM: Failed to prepare device %s "