From: Matthew Wilcox Date: Sun, 17 Jan 2010 21:01:41 +0000 (-0700) Subject: PCI: Make pci_scan_slot more robust X-Git-Tag: v2.6.34-rc1~287^2~29 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4fb88c1a28a8dc302bdc09858e7cdafc97bef794;p=pandora-kernel.git PCI: Make pci_scan_slot more robust Yinghai pointed out that the new pci_scan_slot() crashes when called on an ARI-capable slot that is empty. Fix this by exiting early from pci_scan_slot if there is no device in the slot. Also make next_ari_func() robust against devices not existing in case the ARI capability is corrupt. ARI also requires that the devices be listed in order, so if we find a function listed that is out of order, stop scanning to prevent loops. Signed-off-by: Matthew Wilcox Signed-off-by: Jesse Barnes --- Reading git-diff-tree failed