From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bjorn Helgaas Subject: [PATCH] PM: check sysdev_suspend(PMSG_FREEZE) return value Date: Fri, 15 May 2009 05:33:49 -0600 Message-ID: <20090515113349.3659.20040.stgit@bob.kio> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-pm-bounces@lists.linux-foundation.org Errors-To: linux-pm-bounces@lists.linux-foundation.org To: Rafael J Wysocki , Pavel Machek , Len Brown Cc: linux-pm@lists.linux-foundation.org List-Id: linux-pm@vger.kernel.org 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 --- kernel/power/disk.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/power/disk.c b/kernel/power/disk.c index 2616832..6674722 100644 --- a/kernel/power/disk.c +++ b/kernel/power/disk.c @@ -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; }