aboutsummaryrefslogtreecommitdiff
path: root/hw/isa-bus.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/isa-bus.c')
-rw-r--r--hw/isa-bus.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/hw/isa-bus.c b/hw/isa-bus.c
index 7c94f0b7ba..320768036c 100644
--- a/hw/isa-bus.c
+++ b/hw/isa-bus.c
@@ -130,12 +130,11 @@ ISADevice *isa_create(ISABus *bus, const char *name)
{
DeviceState *dev;
- assert(!bus || bus == isabus);
- if (!isabus) {
+ if (!bus) {
hw_error("Tried to create isa device %s with no isa bus present.",
name);
}
- dev = qdev_create(&isabus->qbus, name);
+ dev = qdev_create(&bus->qbus, name);
return DO_UPCAST(ISADevice, qdev, dev);
}
@@ -143,12 +142,11 @@ ISADevice *isa_try_create(ISABus *bus, const char *name)
{
DeviceState *dev;
- assert(!bus || bus == isabus);
- if (!isabus) {
+ if (!bus) {
hw_error("Tried to create isa device %s with no isa bus present.",
name);
}
- dev = qdev_try_create(&isabus->qbus, name);
+ dev = qdev_try_create(&bus->qbus, name);
return DO_UPCAST(ISADevice, qdev, dev);
}