pm: fix second time add wakelock dq caused error

Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
ligd 2023-06-21 17:17:59 +08:00 committed by Xiang Xiao
parent d313248a5b
commit bfe962ce2c

View File

@ -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);
}