From 486d27a4025c2b2d81528c65a543157c1f250154 Mon Sep 17 00:00:00 2001 From: Ranjani Sridharan Date: Mon, 12 May 2025 13:53:40 -0700 Subject: [PATCH] zephyr: lib: cpu: Remove redundant check pm_state_force() sets the forced state and always returns true. So remove the redundant check for failure. Signed-off-by: Ranjani Sridharan --- zephyr/lib/cpu.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/zephyr/lib/cpu.c b/zephyr/lib/cpu.c index 79946cc039f1..8c2006007744 100644 --- a/zephyr/lib/cpu.c +++ b/zephyr/lib/cpu.c @@ -218,10 +218,7 @@ void cpu_disable_core(int id) } #if defined(CONFIG_PM) /* TODO: before requesting core shut down check if it's not actively used */ - if (!pm_state_force(id, &(struct pm_state_info){PM_STATE_SOFT_OFF, 0, 0})) { - tr_err(&zephyr_tr, "failed to set PM_STATE_SOFT_OFF on core %d", id); - return; - } + pm_state_force(id, &(struct pm_state_info){PM_STATE_SOFT_OFF, 0, 0}); /* Primary core will be turn off by the host after it enter SOFT_OFF state */ if (cpu_is_primary(id))