From: Dexuan Cui Date: Tue, 31 Mar 2020 15:55:25 +0000 (-0700) Subject: PM: hibernate: Propagate the return value of hibernation_restore() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=3704a6a445790e6621c19be25d85dfadbeb16a69;p=openwrt%2Fstaging%2Fblogic.git PM: hibernate: Propagate the return value of hibernation_restore() If hibernation_restore() fails, the 'error' should not be zero. Signed-off-by: Dexuan Cui Signed-off-by: Rafael J. Wysocki --- 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();