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

commit bfe962ce2c7101eb9cdf7972b1a741c6a83cb9ce
Author: ligd <[email protected]>
AuthorDate: Wed Jun 21 17:17:59 2023 +0800

    pm: fix second time add wakelock dq caused error
    
    Signed-off-by: ligd <[email protected]>
---
 drivers/power/pm/pm_activity.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/power/pm/pm_activity.c b/drivers/power/pm/pm_activity.c
index ff6dab8adb..2c51bd05b9 100644
--- a/drivers/power/pm/pm_activity.c
+++ b/drivers/power/pm/pm_activity.c
@@ -66,7 +66,7 @@ static void pm_wakelock_stats(FAR struct pm_wakelock_s 
*wakelock, bool stay)
 
   if (stay)
     {
-      if (!wakelock->fsnode.blink && !wakelock->fsnode.flink)
+      if (!dq_inqueue(&wakelock->fsnode, &pdom->wakelockall))
         {
           dq_addlast(&wakelock->fsnode, &pdom->wakelockall);
         }

Reply via email to