mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
memory: add parameter errp to memory_region_init_rom_device
Add parameter errp to memory_region_init_rom_device and update all call sites to propagate the error. Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Hu Tao <hutao@cn.fujitsu.com> [Propagate the error out of realize. - Paolo] Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
49946538d2
commit
33e0eb5297
4 changed files with 20 additions and 5 deletions
5
memory.c
5
memory.c
|
@ -1204,7 +1204,8 @@ void memory_region_init_rom_device(MemoryRegion *mr,
|
|||
const MemoryRegionOps *ops,
|
||||
void *opaque,
|
||||
const char *name,
|
||||
uint64_t size)
|
||||
uint64_t size,
|
||||
Error **errp)
|
||||
{
|
||||
memory_region_init(mr, owner, name, size);
|
||||
mr->ops = ops;
|
||||
|
@ -1212,7 +1213,7 @@ void memory_region_init_rom_device(MemoryRegion *mr,
|
|||
mr->terminates = true;
|
||||
mr->rom_device = true;
|
||||
mr->destructor = memory_region_destructor_rom_device;
|
||||
mr->ram_addr = qemu_ram_alloc(size, mr, &error_abort);
|
||||
mr->ram_addr = qemu_ram_alloc(size, mr, errp);
|
||||
}
|
||||
|
||||
void memory_region_init_iommu(MemoryRegion *mr,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue