Signed-off-by: Andrea Bolognani <abologna@redhat.com>
---
src/qemu/qemu_command.c | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index aabc3d773f..8efcbdebae 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -3043,6 +3043,11 @@ qemuBuildSkipController(const virDomainControllerDef *controller,
return true;
}
+ /* skip USB controllers with type none */
+ if (controller->type == VIR_DOMAIN_CONTROLLER_TYPE_USB &&
+ controller->model == VIR_DOMAIN_CONTROLLER_MODEL_USB_NONE)
+ return true;
+
return false;
}
@@ -3081,13 +3086,6 @@ qemuBuildControllersByTypeCommandLine(virCommand *cmd,
if (qemuBuildSkipController(cont, def))
continue;
- if (cont->type == VIR_DOMAIN_CONTROLLER_TYPE_USB) {
-
- /* skip USB controllers with type none*/
- if (cont->model == VIR_DOMAIN_CONTROLLER_MODEL_USB_NONE)
- continue;
- }
-
if (qemuBuildControllerDevProps(def, cont, qemuCaps, &props) < 0)
return -1;
--
2.50.1