From 9b2c299a359c0415c431767ef49dfdf1a575a76f Mon Sep 17 00:00:00 2001 From: Daniel Veillard Date: Mon, 21 Dec 2009 12:32:55 +0100 Subject: [PATCH] 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 --- src/qemu/qemu_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 890aa84d78..60dea9ce86 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -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) || -- GitLab