summaryrefslogtreecommitdiffstats
path: root/kernel/power
diff options
context:
space:
mode:
authorDexuan Cui <decui@microsoft.com>2020-03-31 08:55:25 -0700
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2020-04-01 11:36:11 +0200
commit3704a6a445790e6621c19be25d85dfadbeb16a69 (patch)
tree0ebe7037a9d15ea687d63ceada43850e86076c7d /kernel/power
parent2ce94bc4e056d3e48291aac87a95ebd2a86348ba (diff)
downloadlinux-3704a6a445790e6621c19be25d85dfadbeb16a69.tar.gz
linux-3704a6a445790e6621c19be25d85dfadbeb16a69.tar.bz2
linux-3704a6a445790e6621c19be25d85dfadbeb16a69.zip
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>
Diffstat (limited to 'kernel/power')
-rw-r--r--kernel/power/hibernate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c
index 6dbeedb7354c..86aba8706b16 100644
--- a/kernel/power/hibernate.c
+++ b/kernel/power/hibernate.c
@@ -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();