xhh233 commented on issue #22172:
URL: https://github.com/apache/nuttx/issues/22172#issuecomment-7093440436
Candidate patch (against the pinned snapshot; `git apply --check` clean):
```diff
--- a/drivers/power/pm/pm_runtime.c
+++ b/drivers/power/pm/pm_runtime.c
@@ -29,6 +29,7 @@
#include <nuttx/debug.h>
#include <assert.h>
#include <errno.h>
+#include <string.h>
#include <sched.h>
#include <nuttx/clock.h>
#include <nuttx/arch.h>
@@ -188,6 +189,7 @@
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));
rpm->use_count = 0;
rpm->suspend_delay = 0;
rpm->state = state;
```
--
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]