From patchwork Thu Jan 31 15:42:24 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [RFC, 1/2] qbus_find_recursive(): don't abort search for named bus on full bus node Date: Thu, 31 Jan 2013 05:42:24 -0000 From: Laszlo Ersek X-Patchwork-Id: 217202 Message-Id: <1359646945-2876-2-git-send-email-lersek@redhat.com> To: qemu-devel@nongnu.org, fred.konrad@greensocs.com, peter.maydell@linaro.org, lcapitulino@redhat.com The bus we're looking for could be in the sub-tree rooted at the node being checked; don't skip looping over the children. Signed-off-by: Laszlo Ersek --- hw/qdev-monitor.c | 10 +--------- 1 files changed, 1 insertions(+), 9 deletions(-) diff --git a/hw/qdev-monitor.c b/hw/qdev-monitor.c index 4e2a92b..34f5014 100644 --- a/hw/qdev-monitor.c +++ b/hw/qdev-monitor.c @@ -295,15 +295,7 @@ static BusState *qbus_find_recursive(BusState *bus, const char *name, match = 0; } 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", - bus->name); - return NULL; - } else { - /* bus was not specified: try to find another one. */ - match = 0; - } + match = 0; } if (match) { return bus;