From e40c5b6b3f5483bd4e1f493853e6a1f12eba1e93 Mon Sep 17 00:00:00 2001 From: David Hildenbrand Date: Fri, 5 Oct 2018 11:20:15 +0200 Subject: memory-device: forward errors in get_region_size()/get_plugged_size() Let's properly forward the errors, so errors from get_region_size() / get_plugged_size() can be handled. Users right now call both functions after the device has been realized, which is will never fail, so it is fine to continue using error_abort. While at it, remove a leftover error check (suggested by Igor). Reviewed-by: David Gibson Reviewed-by: Igor Mammedov Reviewed-by: Eric Auger Signed-off-by: David Hildenbrand Message-Id: <20181005092024.14344-8-david@redhat.com> Signed-off-by: Eduardo Habkost --- include/hw/mem/memory-device.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/hw/mem') diff --git a/include/hw/mem/memory-device.h b/include/hw/mem/memory-device.h index 2853b084b5..f02b229837 100644 --- a/include/hw/mem/memory-device.h +++ b/include/hw/mem/memory-device.h @@ -33,8 +33,8 @@ typedef struct MemoryDeviceClass { InterfaceClass parent_class; uint64_t (*get_addr)(const MemoryDeviceState *md); - uint64_t (*get_plugged_size)(const MemoryDeviceState *md); - uint64_t (*get_region_size)(const MemoryDeviceState *md); + uint64_t (*get_plugged_size)(const MemoryDeviceState *md, Error **errp); + uint64_t (*get_region_size)(const MemoryDeviceState *md, Error **errp); void (*fill_device_info)(const MemoryDeviceState *md, MemoryDeviceInfo *info); } MemoryDeviceClass; -- cgit v1.2.3