aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/arm/aspeed.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
index 90504ee444..088550ed33 100644
--- a/hw/arm/aspeed.c
+++ b/hw/arm/aspeed.c
@@ -274,7 +274,11 @@ static void write_boot_rom(DriveInfo *dinfo, hwaddr addr, size_t rom_size,
static void aspeed_board_init_flashes(AspeedSMCState *s, const char *flashtype,
unsigned int count, int unit0)
{
- int i ;
+ int i;
+
+ if (!flashtype) {
+ return;
+ }
for (i = 0; i < count; ++i) {
DriveInfo *dinfo = drive_get(IF_MTD, 0, unit0 + i);