mirror of https://gitee.com/openkylin/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 <crobinso@redhat.com> Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
This commit is contained in:
parent
2552752f0b
commit
ed831437af
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue