PM: check sysdev_suspend(PMSG_FREEZE) return value
authorBjorn Helgaas <bjorn.helgaas@hp.com>
Fri, 15 May 2009 21:30:50 +0000 (23:30 +0200)
committerRafael J. Wysocki <rjw@sisk.pl>
Fri, 15 May 2009 21:30:50 +0000 (23:30 +0200)
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>
kernel/power/disk.c

index e71ca9cd81b283ac408c82bd9b97c39aea0b09bc..b0dc9e7a0d17555d19baecbf1780948ec647698a 100644 (file)
@@ -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;
        }