diff options
author | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-02-05 22:06:05 +0000 |
---|---|---|
committer | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-02-05 22:06:05 +0000 |
commit | 487414f1cbd638beb0227c7da71fe7b8a821e155 (patch) | |
tree | bb751c10d2d6953ea16cd8e192e0ee99a7d2ad7f /hw/ppc405_boards.c | |
parent | 090f1fa3237cbbc2338d29fe7ddb7d35396cddbb (diff) | |
download | qemu-487414f1cbd638beb0227c7da71fe7b8a821e155.zip qemu-487414f1cbd638beb0227c7da71fe7b8a821e155.tar.gz qemu-487414f1cbd638beb0227c7da71fe7b8a821e155.tar.bz2 |
hw: remove error handling from qemu_malloc() callers (Avi Kivity)
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6529 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/ppc405_boards.c')
-rw-r--r-- | hw/ppc405_boards.c | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/hw/ppc405_boards.c b/hw/ppc405_boards.c index 49dd10f..945f095 100644 --- a/hw/ppc405_boards.c +++ b/hw/ppc405_boards.c @@ -162,13 +162,11 @@ static void ref405ep_fpga_init (uint32_t base) int fpga_memory; fpga = qemu_mallocz(sizeof(ref405ep_fpga_t)); - if (fpga != NULL) { - fpga_memory = cpu_register_io_memory(0, ref405ep_fpga_read, - ref405ep_fpga_write, fpga); - cpu_register_physical_memory(base, 0x00000100, fpga_memory); - ref405ep_fpga_reset(fpga); - qemu_register_reset(&ref405ep_fpga_reset, fpga); - } + fpga_memory = cpu_register_io_memory(0, ref405ep_fpga_read, + ref405ep_fpga_write, fpga); + cpu_register_physical_memory(base, 0x00000100, fpga_memory); + ref405ep_fpga_reset(fpga); + qemu_register_reset(&ref405ep_fpga_reset, fpga); } static void ref405ep_init (ram_addr_t ram_size, int vga_ram_size, @@ -486,13 +484,11 @@ static void taihu_cpld_init (uint32_t base) int cpld_memory; cpld = qemu_mallocz(sizeof(taihu_cpld_t)); - if (cpld != NULL) { - cpld_memory = cpu_register_io_memory(0, taihu_cpld_read, - taihu_cpld_write, cpld); - cpu_register_physical_memory(base, 0x00000100, cpld_memory); - taihu_cpld_reset(cpld); - qemu_register_reset(&taihu_cpld_reset, cpld); - } + cpld_memory = cpu_register_io_memory(0, taihu_cpld_read, + taihu_cpld_write, cpld); + cpu_register_physical_memory(base, 0x00000100, cpld_memory); + taihu_cpld_reset(cpld); + qemu_register_reset(&taihu_cpld_reset, cpld); } static void taihu_405ep_init(ram_addr_t ram_size, int vga_ram_size, |