xiaoxiang781216 commented on code in PR #22506:
URL: https://github.com/apache/nuttx/pull/22506#discussion_r4726366476
##########
drivers/power/pm/pm_runtime.c:
##########
@@ -188,6 +188,7 @@ void pm_runtime_init(FAR struct pm_runtime_s *rpm,
rpm_state_e state,
DEBUGASSERT(rpm != NULL && ops != NULL);
DEBUGASSERT(state == RPM_ACTIVE || state == RPM_SUSPENDED);
nxrmutex_init(&rpm->lock);
+ memset(&rpm->suspend_work, 0, sizeof(rpm->suspend_work));
Review Comment:
```suggestion
memset(rpm, 0, sizeof(*rpm));
```
and move before line 190, remove line 192-193
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]