aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--system/memory.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/system/memory.c b/system/memory.c
index 3997ac5..c1374e9 100644
--- a/system/memory.c
+++ b/system/memory.c
@@ -3577,11 +3577,8 @@ void memory_region_init_ram(MemoryRegion *mr,
Error **errp)
{
DeviceState *owner_dev;
- Error *err = NULL;
- memory_region_init_ram_nomigrate(mr, owner, name, size, &err);
- if (err) {
- error_propagate(errp, err);
+ if (!memory_region_init_ram_nomigrate(mr, owner, name, size, errp)) {
return;
}
/* This will assert if owner is neither NULL nor a DeviceState.