From: Jonathon Jongsma Date: Fri, 18 Oct 2019 15:30:09 +0000 (-0500) Subject: qemu: fix domain device validation X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=ed831437af7c03e6c6e8143b0ee68d34ae94af25;p=libvirt.git 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 --- 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) {