From bfe962ce2c7101eb9cdf7972b1a741c6a83cb9ce Mon Sep 17 00:00:00 2001 From: ligd Date: Wed, 21 Jun 2023 17:17:59 +0800 Subject: [PATCH] pm: fix second time add wakelock dq caused error Signed-off-by: ligd --- 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); }