aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/common/mcpm_entry.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/common/mcpm_entry.c')
-rw-r--r--arch/arm/common/mcpm_entry.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/arm/common/mcpm_entry.c b/arch/arm/common/mcpm_entry.c
index 370236dd1a03..990250965f2c 100644
--- a/arch/arm/common/mcpm_entry.c
+++ b/arch/arm/common/mcpm_entry.c
@@ -51,7 +51,8 @@ void mcpm_cpu_power_down(void)
51{ 51{
52 phys_reset_t phys_reset; 52 phys_reset_t phys_reset;
53 53
54 BUG_ON(!platform_ops); 54 if (WARN_ON_ONCE(!platform_ops || !platform_ops->power_down))
55 return;
55 BUG_ON(!irqs_disabled()); 56 BUG_ON(!irqs_disabled());
56 57
57 /* 58 /*
@@ -93,7 +94,8 @@ void mcpm_cpu_suspend(u64 expected_residency)
93{ 94{
94 phys_reset_t phys_reset; 95 phys_reset_t phys_reset;
95 96
96 BUG_ON(!platform_ops); 97 if (WARN_ON_ONCE(!platform_ops || !platform_ops->suspend))
98 return;
97 BUG_ON(!irqs_disabled()); 99 BUG_ON(!irqs_disabled());
98 100
99 /* Very similar to mcpm_cpu_power_down() */ 101 /* Very similar to mcpm_cpu_power_down() */