From ed831437af7c03e6c6e8143b0ee68d34ae94af25 Mon Sep 17 00:00:00 2001 From: Jonathon Jongsma Date: Fri, 18 Oct 2019 10:30:09 -0500 Subject: [PATCH] qemu: fix domain device validation When the virDomainCapsDeviceDefValidate() function returned an error status (-1), we were aborting the function early, but returning the default return value (0). This patch properly returns an error in that case. Reviewed-by: Cole Robinson Signed-off-by: Jonathon Jongsma --- src/qemu/qemu_domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 7123f45cd7..d3b6d61112 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -7225,7 +7225,7 @@ qemuDomainDeviceDefValidate(const virDomainDeviceDef *dev, if ((ret = qemuDomainDeviceDefValidateAddress(dev, qemuCaps)) < 0) goto cleanup; - if (virDomainCapsDeviceDefValidate(domCaps, dev, def) < 0) + if ((ret = virDomainCapsDeviceDefValidate(domCaps, dev, def)) < 0) goto cleanup; switch ((virDomainDeviceType)dev->type) { -- GitLab