Skip to content

Commit

Permalink
PM / Hibernate: Fix snapshot error code path
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Rafael J. Wysocki committed Jul 19, 2010
1 parent f6f71f1 commit d074ee0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/power/hibernate.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit d074ee0

Please sign in to comment.