PM: hibernate: Propagate the return value of hibernation_restore()
Subsystems (2)
PATCH 1/1 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]>
--- kernel/power/hibernate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/power/hibernate.c +1 -1
@@ -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 ();
Signature · 1 line
1.8.3.1
Quoted 13 lines · Dexuan Cui
If
hibernation_restore()fails, the 'error' should not be zero.Signed-off-by Dexuan Cui <[email protected]>--- kernel/power/hibernate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)kernel/power/hibernate.c +0
-0
kernel/power/hibernate.c static int load_image_and_restore(void)
Quoted 9 lines
kernel/power/hibernate.c +1
-2@@ -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 (); --
Applied as 5.7-rc material, thanks!