Commit d074ee02 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki

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: default avatarRafael J. Wysocki <rjw@sisk.pl>
Acked-by: default avatarLen Brown <len.brown@intel.com>
parent f6f71f18
...@@ -330,7 +330,7 @@ int hibernation_snapshot(int platform_mode) ...@@ -330,7 +330,7 @@ int hibernation_snapshot(int platform_mode)
error = platform_begin(platform_mode); error = platform_begin(platform_mode);
if (error) if (error)
return error; goto Close;
/* Preallocate image memory before shutting down devices. */ /* Preallocate image memory before shutting down devices. */
error = hibernate_preallocate_memory(); error = hibernate_preallocate_memory();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment