From 1fcdb107ba15f344a902e58c1f9e6769706afc45 Mon Sep 17 00:00:00 2001 From: MrKevinWeiss Date: Tue, 2 Apr 2024 11:47:46 +0200 Subject: [PATCH] core/lib: guard pm_off --- core/lib/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/lib/init.c b/core/lib/init.c index 75abf23dd6..fd0a218424 100644 --- a/core/lib/init.c +++ b/core/lib/init.c @@ -81,7 +81,7 @@ static void *main_trampoline(void *arg) } #endif - if (IS_ACTIVE(CONFIG_CORE_EXIT_WITH_MAIN)) { + if (IS_ACTIVE(CONFIG_CORE_EXIT_WITH_MAIN) && IS_USED(MODULE_PERIPH_PM)) { pm_off(); }