diff options
Diffstat (limited to 'arch/ppc64/kernel/pci.c')
-rw-r--r-- | arch/ppc64/kernel/pci.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/ppc64/kernel/pci.c b/arch/ppc64/kernel/pci.c index b5ca7d8347e2..446b4654883f 100644 --- a/arch/ppc64/kernel/pci.c +++ b/arch/ppc64/kernel/pci.c | |||
@@ -837,9 +837,11 @@ int pcibios_scan_all_fns(struct pci_bus *bus, int devfn) | |||
837 | * device tree. If they are then we need to scan all the | 837 | * device tree. If they are then we need to scan all the |
838 | * functions of this slot. | 838 | * functions of this slot. |
839 | */ | 839 | */ |
840 | for (dn = busdn->child; dn; dn = dn->sibling) | 840 | for (dn = busdn->child; dn; dn = dn->sibling) { |
841 | if ((dn->devfn >> 3) == (devfn >> 3)) | 841 | struct pci_dn *pdn = dn->data; |
842 | if (pdn && (pdn->devfn >> 3) == (devfn >> 3)) | ||
842 | return 1; | 843 | return 1; |
844 | } | ||
843 | 845 | ||
844 | return 0; | 846 | return 0; |
845 | } | 847 | } |