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

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
......@@ -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();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment