Skip to content

Commit

Permalink
PM: check sysdev_suspend(PMSG_FREEZE) return value
Browse files Browse the repository at this point in the history
Check the return value of sysdev_suspend().  I think this was a typo.
Without this change, the following "if" check is always false.
I also changed the error message so it's distinguishable from the
similar message a few lines above.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
  • Loading branch information
Bjorn Helgaas authored and Rafael J. Wysocki committed May 15, 2009
1 parent 8c21f34 commit 4484079
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kernel/power/disk.c
Original file line number Diff line number Diff line change
Expand Up @@ -241,9 +241,9 @@ static int create_image(int platform_mode)

local_irq_disable();

sysdev_suspend(PMSG_FREEZE);
error = sysdev_suspend(PMSG_FREEZE);
if (error) {
printk(KERN_ERR "PM: Some devices failed to power down, "
printk(KERN_ERR "PM: Some system devices failed to power down, "
"aborting hibernation\n");
goto Enable_irqs;
}
Expand Down

0 comments on commit 4484079

Please sign in to comment.