mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-11-05 20:35:44 +00:00
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:
parent
7451afb671
commit
2790cd911e
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue