Skip to content

Commit ed43ad0

Browse files
committed
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 <ranjani.sridharan@linux.intel.com>
1 parent 8386366 commit ed43ad0

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

zephyr/lib/cpu.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,10 +218,7 @@ void cpu_disable_core(int id)
218218
}
219219
#if defined(CONFIG_PM)
220220
/* TODO: before requesting core shut down check if it's not actively used */
221-
if (!pm_state_force(id, &(struct pm_state_info){PM_STATE_SOFT_OFF, 0, 0})) {
222-
tr_err(&zephyr_tr, "failed to set PM_STATE_SOFT_OFF on core %d", id);
223-
return;
224-
}
221+
pm_state_force(id, &(struct pm_state_info){PM_STATE_SOFT_OFF, 0, 0})
225222

226223
/* Primary core will be turn off by the host after it enter SOFT_OFF state */
227224
if (cpu_is_primary(id))

0 commit comments

Comments
 (0)