diff options
Diffstat (limited to 'hw/ssi/omap_spi.c')
-rw-r--r-- | hw/ssi/omap_spi.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/ssi/omap_spi.c b/hw/ssi/omap_spi.c index 119e325a64..27263299be 100644 --- a/hw/ssi/omap_spi.c +++ b/hw/ssi/omap_spi.c @@ -342,8 +342,7 @@ static const MemoryRegionOps omap_mcspi_ops = { struct omap_mcspi_s *omap_mcspi_init(struct omap_target_agent_s *ta, int chnum, qemu_irq irq, qemu_irq *drq, omap_clk fclk, omap_clk iclk) { - struct omap_mcspi_s *s = (struct omap_mcspi_s *) - g_malloc0(sizeof(struct omap_mcspi_s)); + struct omap_mcspi_s *s = g_new0(struct omap_mcspi_s, 1); struct omap_mcspi_ch_s *ch = s->ch; s->irq = irq; |