Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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();