[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 094/103] qdev: reorganize error reporting in bus_set_
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL 094/103] qdev: reorganize error reporting in bus_set_realized |
Date: |
Tue, 17 Jun 2014 20:42:07 +0300 |
From: Paolo Bonzini <address@hidden>
No semantic change.
Cc: address@hidden
Signed-off-by: Paolo Bonzini <address@hidden>
Tested-by: Michael S. Tsirkin <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
Reviewed-by: Andreas Färber <address@hidden>
---
hw/core/qdev.c | 18 +++++-------------
1 file changed, 5 insertions(+), 13 deletions(-)
diff --git a/hw/core/qdev.c b/hw/core/qdev.c
index 3226a71..65aa041 100644
--- a/hw/core/qdev.c
+++ b/hw/core/qdev.c
@@ -573,27 +573,19 @@ static void bus_set_realized(Object *obj, bool value,
Error **errp)
if (value && !bus->realized) {
if (bc->realize) {
bc->realize(bus, &local_err);
-
- if (local_err != NULL) {
- goto error;
- }
-
}
} else if (!value && bus->realized) {
if (bc->unrealize) {
bc->unrealize(bus, &local_err);
-
- if (local_err != NULL) {
- goto error;
- }
}
}
- bus->realized = value;
- return;
+ if (local_err != NULL) {
+ error_propagate(errp, local_err);
+ return;
+ }
-error:
- error_propagate(errp, local_err);
+ bus->realized = value;
}
void qbus_create_inplace(void *bus, size_t size, const char *typename,
--
MST
- [Qemu-devel] [PULL 082/103] hostmem: separate allocation from UserCreatable complete method, (continued)
- [Qemu-devel] [PULL 082/103] hostmem: separate allocation from UserCreatable complete method, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 083/103] hostmem: add file-based HostMemoryBackend, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 077/103] memory: move mem_path handling to memory_region_allocate_system_memory, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 084/103] hostmem: add merge and dump properties, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 085/103] hostmem: allow preallocation of any memory region, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 089/103] hmp: add info memdev, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 090/103] tests: fix memory leak in test of string input visitor, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 091/103] qapi: make string input visitor parse int list, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 092/103] qapi: make string output visitor parse int list, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 093/103] qapi: fix build on glib < 2.28, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 094/103] qdev: reorganize error reporting in bus_set_realized,
Michael S. Tsirkin <=
- [Qemu-devel] [PULL 095/103] qdev: recursively unrealize devices when unrealizing bus, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 096/103] qmp: clean out whitespace, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 048/103] Add G_IO_HUP handler for socket chardev, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 063/103] NUMA: check if the total numa memory size is equal to ram_size, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 064/103] NUMA: Add numa_info structure to contain numa nodes info, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 099/103] qmp: add query-memory-devices command, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 100/103] acpi: introduce TYPE_ACPI_DEVICE_IF interface, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 062/103] NUMA: move numa related code to new file numa.c, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 097/103] pc: acpi: do not hardcode preprocessor, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 098/103] numa: handle mmaped memory allocation failure correctly, Michael S. Tsirkin, 2014/06/17