[pic][gicv3-its] fixup cleanup path removes list node after freeing it

Link: https://github.com/RT-Thread/rt-thread/issues/11604

Signed-off-by: GuEe-GUI <2991707448@qq.com>
This commit is contained in:
GuEe-GUI 2026-07-20 10:56:19 +08:00 committed by Rbb666
parent df959080fc
commit c22b3931b6
1 changed files with 2 additions and 3 deletions

View File

@ -1482,6 +1482,7 @@ rt_err_t gicv3_its_ofw_probe(struct rt_ofw_node *np, const struct rt_ofw_node_id
goto _free_all;
}
rt_list_init(&its->list);
its->base = rt_ofw_iomap(its_np, 0);
if (!its->base)
@ -1501,7 +1502,6 @@ rt_err_t gicv3_its_ofw_probe(struct rt_ofw_node *np, const struct rt_ofw_node_id
}
its->np = its_np;
rt_list_init(&its->list);
rt_list_insert_before(&its_nodes, &its->list);
}
@ -1577,8 +1577,7 @@ rt_err_t gicv3_its_ofw_probe(struct rt_ofw_node *np, const struct rt_ofw_node_id
_free_all:
rt_list_for_each_entry_safe(its, its_next, &its_nodes, list)
{
rt_free(its);
rt_list_remove(&its->list);
its_init_fail(its);
}
return err;