mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
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>
This commit is contained in:
parent
65395b3cdd
commit
20f822261a
5 changed files with 24 additions and 44 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue