This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 7a417da65e pm:check the domain in pm_querystate
7a417da65e is described below
commit 7a417da65e3cc8dfa9324d8866b8909ea7783e4c
Author: dulibo1 <[email protected]>
AuthorDate: Wed Sep 13 16:43:03 2023 +0800
pm:check the domain in pm_querystate
Signed-off-by: dulibo1 <[email protected]>
---
drivers/power/pm/pm_changestate.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/power/pm/pm_changestate.c
b/drivers/power/pm/pm_changestate.c
index a6ed4702e6..412edf43f1 100644
--- a/drivers/power/pm/pm_changestate.c
+++ b/drivers/power/pm/pm_changestate.c
@@ -306,6 +306,7 @@ int pm_changestate(int domain, enum pm_state_e newstate)
enum pm_state_e pm_querystate(int domain)
{
+ DEBUGASSERT(domain >= 0 && domain < CONFIG_PM_NDOMAINS);
return g_pmglobals.domain[domain].state;
}