[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAJZ5v0ijmuZ6GPpnrRoBbbYGiqDbu5HpPcSRD-bdfko7SeJ+mQ@mail.gmail.com>
Date: Wed, 1 Apr 2020 11:37:32 +0200
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: Dexuan Cui <decui@...rosoft.com>
Cc: "Rafael J. Wysocki" <rjw@...ysocki.net>,
Len Brown <len.brown@...el.com>, Pavel Machek <pavel@....cz>,
Linux PM <linux-pm@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] PM: hibernate: Propagate the return value of hibernation_restore()
On Tue, Mar 31, 2020 at 5:56 PM Dexuan Cui <decui@...rosoft.com> wrote:
>
> If hibernation_restore() fails, the 'error' should not be zero.
>
> Signed-off-by: Dexuan Cui <decui@...rosoft.com>
> ---
> kernel/power/hibernate.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c
> index 6dbeedb..86aba87 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();
> --
Applied as 5.7-rc material, thanks!
Powered by blists - more mailing lists