From: Pavel Machek <pavel@ucw.cz>
To: MyungJoo Ham <myungjoo.ham@samsung.com>
Cc: Len Brown <len.brown@intel.com>,
kyungmin.park@samsung.com, myungjoo.ham@gmail.com,
linux-pm@lists.linux-foundation.org,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] Power Hibernate: hibernation_ops->leave should be checked as well.
Date: Fri, 26 Nov 2010 06:41:36 +0100 [thread overview]
Message-ID: <20101126054135.GA1939@elf.ucw.cz> (raw)
In-Reply-To: <1290748003-26125-1-git-send-email-myungjoo.ham@samsung.com>
On Fri 2010-11-26 14:06:43, MyungJoo Ham wrote:
> Because hibernate calls hibernation_ops->leave() without checking
> whether hibernation_ops->leave is NULL or not, hiberantion_set_ops
> should WARN_ON if hibernation_ops->leave is NULL.
>
> This patch added one more condition to check hibernation_ops->leave.
>
> Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
ACK.
> ---
> kernel/power/hibernate.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c
> index 8dc31e0..e6c498d 100644
> --- a/kernel/power/hibernate.c
> +++ b/kernel/power/hibernate.c
> @@ -61,7 +61,7 @@ void hibernation_set_ops(struct platform_hibernation_ops *ops)
> {
> if (ops && !(ops->begin && ops->end && ops->pre_snapshot
> && ops->prepare && ops->finish && ops->enter && ops->pre_restore
> - && ops->restore_cleanup)) {
> + && ops->restore_cleanup && ops->leave)) {
> WARN_ON(1);
> return;
> }
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
next prev parent reply other threads:[~2010-11-26 5:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-26 5:06 [PATCH] Power Hibernate: hibernation_ops->leave should be checked as well MyungJoo Ham
2010-11-26 5:41 ` Pavel Machek [this message]
2010-11-26 22:08 ` Rafael J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20101126054135.GA1939@elf.ucw.cz \
--to=pavel@ucw.cz \
--cc=akpm@linux-foundation.org \
--cc=kyungmin.park@samsung.com \
--cc=len.brown@intel.com \
--cc=linux-pm@lists.linux-foundation.org \
--cc=myungjoo.ham@gmail.com \
--cc=myungjoo.ham@samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox