PM: check sysdev_suspend(PMSG_FREEZE) return value
Subsystems (2)
PATCH 1/1 PM: check sysdev_suspend(PMSG_FREEZE) return value
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.
--- kernel/power/disk.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
kernel/power/disk.c +2 -2
@@ -242,9 +242,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; }
Quoted 6 lines · Bjorn Helgaas
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 <[email protected]>
Quoted 20 lines
--- kernel/power/disk.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)kernel/power/disk.c +2
-2@@ -242,9 +242,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; }
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Quoted 1 line · Bjorn Helgaas
Check the return value of
sysdev_suspend(). I think this was a typo.
Yes, it was, good catch!
I'm going to push that to Linus for .30.
Quoted 3 lines
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.
Thanks,
Rafael
Quoted 22 lines
Signed-off-by Bjorn Helgaas <[email protected]>--- kernel/power/disk.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)kernel/power/disk.c +2
-2@@ -242,9 +242,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; }