提交 5729c63a 编写于 作者: M MyungJoo Ham 提交者: Rafael J. Wysocki

PM / Hibernate: hibernation_ops->leave should be checked too

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: NMyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com>
Acked-by: NPavel Machek <pavel@ucw.cz>
Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
上级 8cfe400c
......@@ -62,7 +62,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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册