提交 5d4260ab 编写于 作者: whj123999's avatar whj123999

[pm] index should be less than PM_MODLUE_MAX_ID

上级 a1a656fb
......@@ -836,12 +836,10 @@ rt_uint32_t rt_pm_module_get_status(void)
rt_uint32_t req_status = 0x00;
pm = &_pm;
for (index = 0; index < 32; index ++)
for (index = 0; index < PM_MODULE_MAX_ID; index ++)
{
if (pm->module_status[index].req_status == 0x01)
req_status |= 1<<index;
if (index >= PM_MODULE_MAX_ID)
break;
}
return req_status;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册