diff options
author | Peter Crosthwaite <peter.crosthwaite@xilinx.com> | 2013-03-15 16:41:58 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2013-03-15 16:41:58 +0000 |
commit | 2790cd911e563f7fec7eeb7856b7f5f54437cc0a (patch) | |
tree | edf8de7a202eb6ba2c7498be07f6f7a1fa27603b | |
parent | 7451afb67136275f2461f2d23139f2abed1f15b3 (diff) |
xilinx_spips: Set unused IRQs to NULL
Unused CS lines should init to 0 to avoid segfaulting when accessing an
unattached QSPI controller.
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Message-id: c1e45198032106e69e8fe9339fc2e6348d524fcd.1362373359.git.peter.crosthwaite@xilinx.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r-- | hw/xilinx_spips.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/xilinx_spips.c b/hw/xilinx_spips.c index 6c21b9668b..853f4e0b4b 100644 --- a/hw/xilinx_spips.c +++ b/hw/xilinx_spips.c @@ -497,7 +497,7 @@ static int xilinx_spips_init(SysBusDevice *dev) s->spi[i] = ssi_create_bus(&dev->qdev, bus_name); } - s->cs_lines = g_new(qemu_irq, s->num_cs * s->num_busses); + s->cs_lines = g_new0(qemu_irq, s->num_cs * s->num_busses); ssi_auto_connect_slaves(DEVICE(s), s->cs_lines, s->spi[0]); ssi_auto_connect_slaves(DEVICE(s), s->cs_lines, s->spi[1]); sysbus_init_irq(dev, &s->irq); |