提交 9b2c299a 编写于 作者: D Daniel Veillard

Fix typo in qemudDomainAttachHostPciDevice()

* src/qemu/qemu_driver.c: The 'if' statement is supposed to check return
  value of pci = pciGetDevice(conn, ...); , but check uses if (!dev),
  fix it
上级 2c345831
...@@ -5290,7 +5290,7 @@ static int qemudDomainAttachHostPciDevice(virConnectPtr conn, ...@@ -5290,7 +5290,7 @@ static int qemudDomainAttachHostPciDevice(virConnectPtr conn,
hostdev->source.subsys.u.pci.bus, hostdev->source.subsys.u.pci.bus,
hostdev->source.subsys.u.pci.slot, hostdev->source.subsys.u.pci.slot,
hostdev->source.subsys.u.pci.function); hostdev->source.subsys.u.pci.function);
if (!dev) if (!pci)
return -1; return -1;
if ((hostdev->managed && pciDettachDevice(conn, pci) < 0) || if ((hostdev->managed && pciDettachDevice(conn, pci) < 0) ||
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册