Commit 3704a6a4 authored by Dexuan Cui's avatar Dexuan Cui Committed by Rafael J. Wysocki
Browse files

PM: hibernate: Propagate the return value of hibernation_restore()



If hibernation_restore() fails, the 'error' should not be zero.

Signed-off-by: default avatarDexuan Cui <decui@microsoft.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 2ce94bc4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -678,7 +678,7 @@ static int load_image_and_restore(void)
	error = swsusp_read(&flags);
	swsusp_close(FMODE_READ);
	if (!error)
		hibernation_restore(flags & SF_PLATFORM_MODE);
		error = hibernation_restore(flags & SF_PLATFORM_MODE);

	pr_err("Failed to load image, recovering.\n");
	swsusp_free();