Benjamin Herrenschmidt 1a4b1a41b8 pci: Don't crash when reading mpss from root complex
In pcie_find_smpss(), we have the following statement:

 	if (dev->is_hotplug_bridge && (!list_is_singular(&dev->bus->devices) ||
	    dev->bus->self->pcie_type != PCI_EXP_TYPE_ROOT_PORT))

The problem is that at least on my machine, this gets called for the
root complex (virtual P2P bridge), and dev->bus->self is NULL since
the parent bus for this is not itself anchor to a PCI device.

This adds the necessary NULL check.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Jon Mason <mason@myri.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-09-13 16:08:31 -07:00
..
2011-05-10 15:43:36 -07:00
2011-03-29 14:48:19 +02:00
2011-05-29 02:21:08 -04:00
2009-02-13 12:01:56 -08:00
2010-07-30 09:47:22 -07:00
2011-08-01 11:50:50 -07:00
2010-08-31 15:28:00 -07:00
2009-07-12 12:22:34 -07:00
2011-07-26 16:49:47 -07:00