From: Muli Ben-Yehuda Date: Tue, 26 Sep 2006 08:52:31 +0000 (+0200) Subject: [PATCH] Calgary IOMMU: break out of pci_find_device_reverse if dev not found X-Git-Tag: v2.6.19-rc1~1077^2~152 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9f2dc46d5ec6fd7787182d2232a1003af11879f1;p=linux-2.6 [PATCH] Calgary IOMMU: break out of pci_find_device_reverse if dev not found Signed-off-by: Muli Ben-Yehuda Signed-off-by: Jon Mason Signed-off-by: Andi Kleen --- diff --git a/arch/x86_64/kernel/pci-calgary.c b/arch/x86_64/kernel/pci-calgary.c index 96f6a866af..b2182c9363 100644 --- a/arch/x86_64/kernel/pci-calgary.c +++ b/arch/x86_64/kernel/pci-calgary.c @@ -844,6 +844,8 @@ error: dev = pci_find_device_reverse(PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_CALGARY, dev); + if (!dev) + break; if (!translate_phb(dev)) { pci_dev_put(dev); continue;