From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: linux-pm@lists.linux-foundation.org
Cc: ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
Matthew Garrett <mjg59@srcf.ucam.org>,
Len Brown <lenb@kernel.org>
Subject: [PATCH 2/3] PM / Hibernate: Fix snapshot error code path
Date: Thu, 1 Jul 2010 23:59:24 +0200 [thread overview]
Message-ID: <201007012359.25051.rjw@sisk.pl> (raw)
In-Reply-To: <201007012356.44690.rjw@sisk.pl>
From: Rafael J. Wysocki <rjw@sisk.pl>
There is an inconsistency between hibernation_platform_enter()
and hibernation_snapshot(), because the latter calls
hibernation_ops->end() after failing hibernation_ops->begin(), while
the former doesn't do that. Make hibernation_snapshot() behave in
the same way as hibernation_platform_enter() in that respect.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
---
kernel/power/hibernate.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: linux-2.6/kernel/power/hibernate.c
===================================================================
--- linux-2.6.orig/kernel/power/hibernate.c
+++ linux-2.6/kernel/power/hibernate.c
@@ -330,7 +330,7 @@ int hibernation_snapshot(int platform_mo
error = platform_begin(platform_mode);
if (error)
- return error;
+ goto Close;
/* Preallocate image memory before shutting down devices. */
error = hibernate_preallocate_memory();
next prev parent reply other threads:[~2010-07-01 22:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-01 21:56 [PATCH 0/3] PM: Suspend and hibernate error paths fixes Rafael J. Wysocki
2010-07-01 21:58 ` [PATCH 1/3] PM / Hibernate: Fix hibernation_platform_enter() Rafael J. Wysocki
2010-07-01 21:59 ` Rafael J. Wysocki [this message]
2010-07-01 22:00 ` [PATCH 3/3] PM / Suspend: Fix ordering of calls in suspend error paths Rafael J. Wysocki
2010-07-03 22:17 ` [linux-pm] [PATCH 0/3] PM: Suspend and hibernate error paths fixes Rafael J. Wysocki
2010-07-07 2:20 ` Len Brown
2010-07-07 18:35 ` Rafael J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201007012359.25051.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=mjg59@srcf.ucam.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).