Skip to content

Commit

Permalink
PM: hibernate: Propagate the return value of hibernation_restore()
Browse files Browse the repository at this point in the history
If hibernation_restore() fails, the 'error' should not be zero.

Signed-off-by: Dexuan Cui <decui@microsoft.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Dexuan Cui authored and Rafael J. Wysocki committed Apr 1, 2020
1 parent 2ce94bc commit 3704a6a
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
@@ -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();

0 comments on commit 3704a6a

Please sign in to comment.