提交 ed831437 编写于 作者: J Jonathon Jongsma 提交者: Cole Robinson

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: NCole Robinson <crobinso@redhat.com>
Signed-off-by: NJonathon Jongsma <jjongsma@redhat.com>
上级 2552752f
...@@ -7225,7 +7225,7 @@ qemuDomainDeviceDefValidate(const virDomainDeviceDef *dev, ...@@ -7225,7 +7225,7 @@ qemuDomainDeviceDefValidate(const virDomainDeviceDef *dev,
if ((ret = qemuDomainDeviceDefValidateAddress(dev, qemuCaps)) < 0) if ((ret = qemuDomainDeviceDefValidateAddress(dev, qemuCaps)) < 0)
goto cleanup; goto cleanup;
if (virDomainCapsDeviceDefValidate(domCaps, dev, def) < 0) if ((ret = virDomainCapsDeviceDefValidate(domCaps, dev, def)) < 0)
goto cleanup; goto cleanup;
switch ((virDomainDeviceType)dev->type) { switch ((virDomainDeviceType)dev->type) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册