Index: head/sys/compat/linuxkpi/common/include/linux/pci.h =================================================================== --- head/sys/compat/linuxkpi/common/include/linux/pci.h +++ head/sys/compat/linuxkpi/common/include/linux/pci.h @@ -220,18 +220,19 @@ linux_pci_find_irq_dev(unsigned int irq) { struct pci_dev *pdev; + struct device *found; + found = NULL; spin_lock(&pci_lock); list_for_each_entry(pdev, &pci_devices, links) { - if (irq == pdev->dev.irq) - break; - if (irq >= pdev->dev.msix && irq < pdev->dev.msix_max) + if (irq == pdev->dev.irq || + (irq >= pdev->dev.msix && irq < pdev->dev.msix_max)) { + found = &pdev->dev; break; + } } spin_unlock(&pci_lock); - if (pdev) - return &pdev->dev; - return (NULL); + return (found); } static inline unsigned long