diff options
Diffstat (limited to 'qdev-monitor.c')
-rw-r--r-- | qdev-monitor.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/qdev-monitor.c b/qdev-monitor.c index 73d7946..2cb5600 100644 --- a/qdev-monitor.c +++ b/qdev-monitor.c @@ -292,11 +292,9 @@ static BusState *qbus_find_recursive(BusState *bus, const char *name, if (name && (strcmp(bus->name, name) != 0)) { match = 0; - } - if (bus_typename && !object_dynamic_cast(OBJECT(bus), bus_typename)) { + } else if (bus_typename && !object_dynamic_cast(OBJECT(bus), bus_typename)) { match = 0; - } - if ((bus_class->max_dev != 0) && (bus_class->max_dev <= bus->max_index)) { + } else if ((bus_class->max_dev != 0) && (bus_class->max_dev <= bus->max_index)) { if (name != NULL) { /* bus was explicitly specified: return an error. */ qerror_report(ERROR_CLASS_GENERIC_ERROR, "Bus '%s' is full", |