If hibernation_restore() fails, the 'error' should not be zero.
Unified · Split
| @@ -678,7 +678,7 @@ static int load_image_and_restore(void) · 677 unmodified lines | ||
| 678 | 678 | error = swsusp_read(&flags); |
| 679 | 679 | swsusp_close(FMODE_READ); |
| 680 | 680 | if (!error) |
| 681 | − hibernation_restore(flags & SF_PLATFORM_MODE); | |
| 681 | + error = hibernation_restore(flags & SF_PLATFORM_MODE); | |
| 682 | 682 | |
| 683 | 683 | pr_err("Failed to load image, recovering.\n"); |
| 684 | 684 | swsusp_free(); |