Revision 487414f1 hw/musicpal.c

b/hw/musicpal.c
443 443
    }
444 444

  
445 445
    s = qemu_mallocz(sizeof(musicpal_audio_state));
446
    if (!s)
447
        return NULL;
448 446
    s->irq = irq;
449 447

  
450 448
    i2c = qemu_mallocz(sizeof(i2c_interface));
451
    if (!i2c)
452
        return NULL;
453 449
    i2c->bus = i2c_init_bus();
454 450
    i2c->current_addr = -1;
455 451

  
......
717 713
    qemu_check_nic_model(nd, "mv88w8618");
718 714

  
719 715
    s = qemu_mallocz(sizeof(mv88w8618_eth_state));
720
    if (!s)
721
        return;
722 716
    s->irq = irq;
723 717
    s->vc = qemu_new_vlan_client(nd->vlan, nd->model, nd->name,
724 718
                                 eth_receive, eth_can_receive, s);
......
911 905
    int iomemtype;
912 906

  
913 907
    s = qemu_mallocz(sizeof(musicpal_lcd_state));
914
    if (!s)
915
        return;
916 908
    iomemtype = cpu_register_io_memory(0, musicpal_lcd_readfn,
917 909
                                       musicpal_lcd_writefn, s);
918 910
    cpu_register_physical_memory(base, MP_LCD_SIZE, iomemtype);
......
1008 1000
    qemu_irq *qi;
1009 1001

  
1010 1002
    s = qemu_mallocz(sizeof(mv88w8618_pic_state));
1011
    if (!s)
1012
        return NULL;
1013 1003
    qi = qemu_allocate_irqs(mv88w8618_pic_set_irq, s, 32);
1014 1004
    s->parent_irq = parent_irq;
1015 1005
    iomemtype = cpu_register_io_memory(0, mv88w8618_pic_readfn,
......
1134 1124
    mv88w8618_pit_state *s;
1135 1125

  
1136 1126
    s = qemu_mallocz(sizeof(mv88w8618_pit_state));
1137
    if (!s)
1138
        return;
1139 1127

  
1140 1128
    /* Letting them all run at 1 MHz is likely just a pragmatic
1141 1129
     * simplification. */
......
1200 1188
    mv88w8618_flashcfg_state *s;
1201 1189

  
1202 1190
    s = qemu_mallocz(sizeof(mv88w8618_flashcfg_state));
1203
    if (!s)
1204
        return;
1205 1191

  
1206 1192
    s->cfgr0 = 0xfffe4285; /* Default as set by U-Boot for 8 MB flash */
1207 1193
    iomemtype = cpu_register_io_memory(0, mv88w8618_flashcfg_readfn,

Also available in: Unified diff