PM: sleep: Do not assume that "mem" is always present
authorFlorian Fainelli <f.fainelli@gmail.com>
Wed, 15 Sep 2021 02:23:28 +0000 (19:23 -0700)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 15 Sep 2021 12:04:04 +0000 (14:04 +0200)
commitbfcc1e67ff1e4aa8bfe2ca57f99390fc284c799d
treec0d4ed0fb9e79751880f9b182a329581f235284b
parent6880fa6c56601bb8ed59df6c30fd390cc5f6dd8f
PM: sleep: Do not assume that "mem" is always present

An implementation of suspend_ops is allowed to reject the PM_SUSPEND_MEM
suspend type from its ->valid() callback, we should not assume that it
is always present as this is not a correct reflection of what a firmware
interface may support.

Fixes: 406e79385f32 ("PM / sleep: System sleep state selection interface rework")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
kernel/power/suspend.c