aboutsummaryrefslogtreecommitdiff
path: root/hw/isa-bus.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2009-10-07 01:15:59 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2009-10-07 08:54:54 -0500
commit3f66aa9c07d6392757f9d7b83849c7f791981725 (patch)
tree1ccdfcb05e9c9766747297f1c15b457be2e0f59f /hw/isa-bus.c
parente23a1b33b53d25510320b26d9f154e19c6c99725 (diff)
downloadqemu-3f66aa9c07d6392757f9d7b83849c7f791981725.zip
qemu-3f66aa9c07d6392757f9d7b83849c7f791981725.tar.gz
qemu-3f66aa9c07d6392757f9d7b83849c7f791981725.tar.bz2
Make isa_create() terminate program on failure
Callers don't check the return value anyway. Patchworks-ID: 35172 Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/isa-bus.c')
-rw-r--r--hw/isa-bus.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/hw/isa-bus.c b/hw/isa-bus.c
index f7e73d2..4d489d2 100644
--- a/hw/isa-bus.c
+++ b/hw/isa-bus.c
@@ -114,8 +114,8 @@ ISADevice *isa_create(const char *name)
DeviceState *dev;
if (!isabus) {
- fprintf(stderr, "Tried to create isa device %s with no isa bus present.\n", name);
- return NULL;
+ hw_error("Tried to create isa device %s with no isa bus present.\n",
+ name);
}
dev = qdev_create(&isabus->qbus, name);
return DO_UPCAST(ISADevice, qdev, dev);
@@ -126,9 +126,7 @@ ISADevice *isa_create_simple(const char *name)
ISADevice *dev;
dev = isa_create(name);
- if (qdev_init(&dev->qdev) != 0) {
- return NULL;
- }
+ qdev_init_nofail(&dev->qdev);
return dev;
}