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>
This commit is contained in:
Peter Crosthwaite 2013-03-15 16:41:58 +00:00 committed by Peter Maydell
parent 7451afb671
commit 2790cd911e

View file

@ -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);