From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43050) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WFSNt-0005HX-1A for qemu-devel@nongnu.org; Mon, 17 Feb 2014 12:53:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WFSNp-0008Ep-Is for qemu-devel@nongnu.org; Mon, 17 Feb 2014 12:53:36 -0500 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:45977) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WFSNp-0008EC-CM for qemu-devel@nongnu.org; Mon, 17 Feb 2014 12:53:33 -0500 From: Peter Maydell Date: Mon, 17 Feb 2014 17:53:31 +0000 Message-Id: <1392659611-8439-1-git-send-email-peter.maydell@linaro.org> Subject: [Qemu-devel] [PATCH] hw/intc/exynos4210_combiner: Don't overrun output_irq array in init List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Igor Mitsyanko , Maksim Kozlov , Dmitry Solodkiy , Evgeny Voevodin , patches@linaro.org The Exynos4210 combiner has IIC_NIRQ inputs and IIC_NGRP outputs; use the correct constant in the loop initializing our output sysbus IRQs so that we don't overrun the output_irq[] array. Signed-off-by: Peter Maydell --- hw/intc/exynos4210_combiner.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/intc/exynos4210_combiner.c b/hw/intc/exynos4210_combiner.c index ef5e8eb..3287479 100644 --- a/hw/intc/exynos4210_combiner.c +++ b/hw/intc/exynos4210_combiner.c @@ -418,7 +418,7 @@ static int exynos4210_combiner_init(SysBusDevice *sbd) qdev_init_gpio_in(dev, exynos4210_combiner_handler, IIC_NIRQ); /* Connect SysBusDev irqs to device specific irqs */ - for (i = 0; i < IIC_NIRQ; i++) { + for (i = 0; i < IIC_NGRP; i++) { sysbus_init_irq(sbd, &s->output_irq[i]); } -- 1.8.5