We don't have any caller passing a NULL device argument,
so we can simplify, avoiding to access the global 'isabus'.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/isa/isa-bus.c | 14 ++++----------
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/hw/isa/isa-bus.c b/hw/isa/isa-bus.c
index 9c8224afa5..3036341d3b 100644
--- a/hw/isa/isa-bus.c
+++ b/hw/isa/isa-bus.c
@@ -252,20 +252,14 @@ static char *isabus_get_fw_dev_path(DeviceState *dev)
MemoryRegion *isa_address_space(ISADevice *dev)
{
- if (dev) {
- return isa_bus_from_device(dev)->address_space;
- }
-
- return isabus->address_space;
+ assert(dev);
+ return isa_bus_from_device(dev)->address_space;
}
MemoryRegion *isa_address_space_io(ISADevice *dev)
{
- if (dev) {
- return isa_bus_from_device(dev)->address_space_io;
- }
-
- return isabus->address_space_io;
+ assert(dev);
+ return isa_bus_from_device(dev)->address_space_io;
}
type_init(isabus_register_types)