aboutsummaryrefslogtreecommitdiff
path: root/hw/arm
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2023-01-09 12:53:15 +0100
committerPeter Maydell <peter.maydell@linaro.org>2023-01-12 17:03:14 +0000
commit65395b3cdda7c5ad1a520c985da35f6c6619eb01 (patch)
tree980451b9dca4de5aa2304bee9f03ed39c4dfc20d /hw/arm
parent96c85ef86bc049e8dc0fb92447e88612a19919b0 (diff)
downloadqemu-65395b3cdda7c5ad1a520c985da35f6c6619eb01.zip
qemu-65395b3cdda7c5ad1a520c985da35f6c6619eb01.tar.gz
qemu-65395b3cdda7c5ad1a520c985da35f6c6619eb01.tar.bz2
hw/arm/vexpress: Remove dead code in vexpress_common_init()
Upon introduction in commit b8433303fb ("Set proper device-width for vexpress flash"), ve_pflash_cfi01_register() was calling qdev_init_nofail() which can not fail. This call was later converted with a script to use &error_fatal, still unable to fail. Remove the unreachable code. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20230109115316.2235-13-philmd@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/arm')
-rw-r--r--hw/arm/vexpress.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/hw/arm/vexpress.c b/hw/arm/vexpress.c
index e1d1983..7572367 100644
--- a/hw/arm/vexpress.c
+++ b/hw/arm/vexpress.c
@@ -659,10 +659,6 @@ static void vexpress_common_init(MachineState *machine)
dinfo = drive_get(IF_PFLASH, 0, 0);
pflash0 = ve_pflash_cfi01_register(map[VE_NORFLASH0], "vexpress.flash0",
dinfo);
- if (!pflash0) {
- error_report("vexpress: error registering flash 0");
- exit(1);
- }
if (map[VE_NORFLASHALIAS] != -1) {
/* Map flash 0 as an alias into low memory */
@@ -673,11 +669,7 @@ static void vexpress_common_init(MachineState *machine)
}
dinfo = drive_get(IF_PFLASH, 0, 1);
- if (!ve_pflash_cfi01_register(map[VE_NORFLASH1], "vexpress.flash1",
- dinfo)) {
- error_report("vexpress: error registering flash 1");
- exit(1);
- }
+ ve_pflash_cfi01_register(map[VE_NORFLASH1], "vexpress.flash1", dinfo);
sram_size = 0x2000000;
memory_region_init_ram(sram, NULL, "vexpress.sram", sram_size,