diff options
| author | Philippe Mathieu-Daudé <philmd@linaro.org> | 2023-01-09 12:53:16 +0100 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2023-01-12 17:03:14 +0000 |
| commit | 20f822261a0ea34470b7367be4d06b68bc07071b (patch) | |
| tree | 3e4ceba4b0c6d377e4da3b4f72ab0fb927ac18fd /hw/arm/mainstone.c | |
| parent | 65395b3cdda7c5ad1a520c985da35f6c6619eb01 (diff) | |
| download | focaccia-qemu-20f822261a0ea34470b7367be4d06b68bc07071b.tar.gz focaccia-qemu-20f822261a0ea34470b7367be4d06b68bc07071b.zip | |
hw/arm: Remove unreachable code calling pflash_cfi01_register()
Since its QOM'ification in commit 368a354f02 ("pflash_cfi0x:
QOMified") the pflash_cfi01_register() function does 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-14-philmd@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/arm/mainstone.c')
| -rw-r--r-- | hw/arm/mainstone.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/hw/arm/mainstone.c b/hw/arm/mainstone.c index eebaed6e3e..68329c4617 100644 --- a/hw/arm/mainstone.c +++ b/hw/arm/mainstone.c @@ -130,14 +130,11 @@ static void mainstone_common_init(MachineState *machine, /* There are two 32MiB flash devices on the board */ for (i = 0; i < 2; i ++) { dinfo = drive_get(IF_PFLASH, 0, i); - if (!pflash_cfi01_register(mainstone_flash_base[i], - i ? "mainstone.flash1" : "mainstone.flash0", - MAINSTONE_FLASH_SIZE, - dinfo ? blk_by_legacy_dinfo(dinfo) : NULL, - FLASH_SECTOR_SIZE, 4, 0, 0, 0, 0, 0)) { - error_report("Error registering flash memory"); - exit(1); - } + pflash_cfi01_register(mainstone_flash_base[i], + i ? "mainstone.flash1" : "mainstone.flash0", + MAINSTONE_FLASH_SIZE, + dinfo ? blk_by_legacy_dinfo(dinfo) : NULL, + FLASH_SECTOR_SIZE, 4, 0, 0, 0, 0, 0); } mst_irq = sysbus_create_simple("mainstone-fpga", MST_FPGA_PHYS, |