break out of From: Muli Ben-Yehuda 1 files changed, 2 insertions(+) arch/x86_64/kernel/pci-calgary.c | 2 ++ # HG changeset patch # User Muli Ben-Yehuda # Date 1153737003 -10800 # Node ID 4b8fbf25700873a70eff09264e52e9f6c6330c18 # Parent f85ffa73fb99f4796043a8e50bef1180e36fe582 [x86-64] 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 --- arch/x86_64/kernel/pci-calgary.c | 2 ++ 1 files changed, 2 insertions(+) Index: linux/arch/x86_64/kernel/pci-calgary.c =================================================================== --- linux.orig/arch/x86_64/kernel/pci-calgary.c +++ linux/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;