Skip to content

Commit

Permalink
PM: Clear -EAGAIN in dpm_prepare
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
  • Loading branch information
Sebastian Ott authored and rjwysocki committed Jul 8, 2009
1 parent 00024be commit 886a7a3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/base/power/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 "
Expand Down

0 comments on commit 886a7a3

Please sign in to comment.