]> git.proxmox.com Git - qemu.git/commitdiff
loader: drop return value for rom_add_blob_fixed
authorMichael S. Tsirkin <mst@redhat.com>
Sun, 10 Nov 2013 09:53:30 +0000 (11:53 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Sun, 10 Nov 2013 10:08:38 +0000 (12:08 +0200)
rom_add_blob never fails, and neither does rom_add_blob_fixed,
so there's no need to return value from it.

In fact, rom_add_blob_fixed was erroneously returning -1 unconditionally
which made the only system that checked the return value -M bamboo fail
to start.

Drop the return value and drop checks from ppc440_bamboo to
fix this failure.

Reported-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/ppc/ppc440_bamboo.c
include/hw/loader.h

index 655e49906d80a153ddf60cc3f60794a2fc0b9db2..67597dfb88b03b9b31dbb01b622677879d8d477a 100644 (file)
@@ -110,8 +110,9 @@ static int bamboo_load_device_tree(hwaddr addr,
     qemu_devtree_setprop_cell(fdt, "/cpus/cpu@0", "timebase-frequency",
                               tb_freq);
 
-    ret = rom_add_blob_fixed(BINARY_DEVICE_TREE_FILE, fdt, fdt_size, addr);
+    rom_add_blob_fixed(BINARY_DEVICE_TREE_FILE, fdt, fdt_size, addr);
     g_free(fdt);
+    return 0;
 
 out:
 
index 58eca9832bb2468d03e920418eda416b724886b5..7a23d6bdc1b722d0b1c972d1917bb80fa34129e0 100644 (file)
@@ -55,7 +55,7 @@ void do_info_roms(Monitor *mon, const QDict *qdict);
 #define rom_add_file_fixed(_f, _a, _i)          \
     rom_add_file(_f, NULL, _a, _i)
 #define rom_add_blob_fixed(_f, _b, _l, _a)      \
-    (rom_add_blob(_f, _b, _l, _a, NULL, NULL, NULL) ? 0 : -1)
+    rom_add_blob(_f, _b, _l, _a, NULL, NULL, NULL)
 
 #define PC_ROM_MIN_VGA     0xc0000
 #define PC_ROM_MIN_OPTION  0xc8000