Skip to content

Commit 3704a6a

Browse files
dcuirafaeljw
authored andcommitted
PM: hibernate: Propagate the return value of hibernation_restore()
If hibernation_restore() fails, the 'error' should not be zero. Signed-off-by: Dexuan Cui <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 2ce94bc commit 3704a6a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/power/hibernate.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,7 @@ static int load_image_and_restore(void)
678678
error = swsusp_read(&flags);
679679
swsusp_close(FMODE_READ);
680680
if (!error)
681-
hibernation_restore(flags & SF_PLATFORM_MODE);
681+
error = hibernation_restore(flags & SF_PLATFORM_MODE);
682682

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

0 commit comments

Comments
 (0)