]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Fix typo in qemudDomainAttachHostPciDevice()
authorDaniel Veillard <veillard@redhat.com>
Mon, 21 Dec 2009 11:32:55 +0000 (12:32 +0100)
committerDaniel Veillard <veillard@redhat.com>
Mon, 21 Dec 2009 11:32:55 +0000 (12:32 +0100)
* 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

src/qemu/qemu_driver.c

index 890aa84d78aa90b02b6ed9c1f5fd7b8bd2e35fcd..60dea9ce868e74d9663bc8b6534ef517f79b32ff 100644 (file)
@@ -5290,7 +5290,7 @@ static int qemudDomainAttachHostPciDevice(virConnectPtr conn,
                        hostdev->source.subsys.u.pci.bus,
                        hostdev->source.subsys.u.pci.slot,
                        hostdev->source.subsys.u.pci.function);
-    if (!dev)
+    if (!pci)
         return -1;
 
     if ((hostdev->managed && pciDettachDevice(conn, pci) < 0) ||