summaryrefslogtreecommitdiffstats
path: root/kernel/power
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2010-07-07 23:43:35 +0200
committerRafael J. Wysocki <rjw@sisk.pl>2010-07-19 02:00:35 +0200
commitd074ee023fa3a4681b64223c5e636102c39628c4 (patch)
tree830000adb529463806773d819fe20d76ac0388c5 /kernel/power
parentPM / Hibernate: Fix hibernation_platform_enter() (diff)
downloadlinux-d074ee023fa3a4681b64223c5e636102c39628c4.tar.xz
linux-d074ee023fa3a4681b64223c5e636102c39628c4.zip
PM / Hibernate: Fix snapshot error code path
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> Acked-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'kernel/power')
-rw-r--r--kernel/power/hibernate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c
index d97ba8615c30..d26f04e92743 100644
--- a/kernel/power/hibernate.c
+++ b/kernel/power/hibernate.c
@@ -330,7 +330,7 @@ int hibernation_snapshot(int platform_mode)
error = platform_begin(platform_mode);
if (error)
- return error;
+ goto Close;
/* Preallocate image memory before shutting down devices. */
error = hibernate_preallocate_memory();