aboutsummaryrefslogtreecommitdiff
path: root/hw/arm/npcm7xx_boards.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/arm/npcm7xx_boards.c')
-rw-r--r--hw/arm/npcm7xx_boards.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/hw/arm/npcm7xx_boards.c b/hw/arm/npcm7xx_boards.c
index 79e2e2744c..306260fa67 100644
--- a/hw/arm/npcm7xx_boards.c
+++ b/hw/arm/npcm7xx_boards.c
@@ -23,6 +23,7 @@
#include "hw/qdev-properties.h"
#include "qapi/error.h"
#include "qemu-common.h"
+#include "qemu/datadir.h"
#include "qemu/units.h"
#include "sysemu/sysemu.h"
@@ -33,13 +34,10 @@ static const char npcm7xx_default_bootrom[] = "npcm7xx_bootrom.bin";
static void npcm7xx_load_bootrom(MachineState *machine, NPCM7xxState *soc)
{
+ const char *bios_name = machine->firmware ?: npcm7xx_default_bootrom;
g_autofree char *filename = NULL;
int ret;
- if (!bios_name) {
- bios_name = npcm7xx_default_bootrom;
- }
-
filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, bios_name);
if (!filename) {
error_report("Could not find ROM image '%s'", bios_name);