mirror of https://github.com/xemu-project/xemu.git
hw/intc/exynos4210_gic.c: Fix memory leak by adjusting order
Signed-off-by: Shannon Zhao <zhaoshenglong@huawei.com> Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
This commit is contained in:
parent
9f9b026dc6
commit
9ff7f5bddb
|
@ -213,9 +213,6 @@ void exynos4210_init_board_irqs(Exynos4210Irq *s)
|
||||||
uint32_t grp, bit, irq_id, n;
|
uint32_t grp, bit, irq_id, n;
|
||||||
|
|
||||||
for (n = 0; n < EXYNOS4210_MAX_EXT_COMBINER_IN_IRQ; n++) {
|
for (n = 0; n < EXYNOS4210_MAX_EXT_COMBINER_IN_IRQ; n++) {
|
||||||
s->board_irqs[n] = qemu_irq_split(s->int_combiner_irq[n],
|
|
||||||
s->ext_combiner_irq[n]);
|
|
||||||
|
|
||||||
irq_id = 0;
|
irq_id = 0;
|
||||||
if (n == EXYNOS4210_COMBINER_GET_IRQ_NUM(1, 4) ||
|
if (n == EXYNOS4210_COMBINER_GET_IRQ_NUM(1, 4) ||
|
||||||
n == EXYNOS4210_COMBINER_GET_IRQ_NUM(12, 4)) {
|
n == EXYNOS4210_COMBINER_GET_IRQ_NUM(12, 4)) {
|
||||||
|
@ -230,8 +227,10 @@ void exynos4210_init_board_irqs(Exynos4210Irq *s)
|
||||||
if (irq_id) {
|
if (irq_id) {
|
||||||
s->board_irqs[n] = qemu_irq_split(s->int_combiner_irq[n],
|
s->board_irqs[n] = qemu_irq_split(s->int_combiner_irq[n],
|
||||||
s->ext_gic_irq[irq_id-32]);
|
s->ext_gic_irq[irq_id-32]);
|
||||||
|
} else {
|
||||||
|
s->board_irqs[n] = qemu_irq_split(s->int_combiner_irq[n],
|
||||||
|
s->ext_combiner_irq[n]);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
for (; n < EXYNOS4210_MAX_INT_COMBINER_IN_IRQ; n++) {
|
for (; n < EXYNOS4210_MAX_INT_COMBINER_IN_IRQ; n++) {
|
||||||
/* these IDs are passed to Internal Combiner and External GIC */
|
/* these IDs are passed to Internal Combiner and External GIC */
|
||||||
|
|
Loading…
Reference in New Issue