mirror of
https://github.com/torvalds/linux.git
synced 2024-11-26 06:02:05 +00:00
PM: hibernate: Propagate the return value of hibernation_restore()
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>
This commit is contained in:
parent
2ce94bc4e0
commit
3704a6a445
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user