aboutsummaryrefslogtreecommitdiff
path: root/system/memory.c
diff options
context:
space:
mode:
Diffstat (limited to 'system/memory.c')
-rw-r--r--system/memory.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/system/memory.c b/system/memory.c
index 72c6441e20..3997ac5928 100644
--- a/system/memory.c
+++ b/system/memory.c
@@ -3601,11 +3601,8 @@ void memory_region_init_rom(MemoryRegion *mr,
Error **errp)
{
DeviceState *owner_dev;
- Error *err = NULL;
- memory_region_init_rom_nomigrate(mr, owner, name, size, &err);
- if (err) {
- error_propagate(errp, err);
+ if (!memory_region_init_rom_nomigrate(mr, owner, name, size, errp)) {
return;
}
/* This will assert if owner is neither NULL nor a DeviceState.