Jesper Juhl 7c867c8899 PCI: Avoid potential NULL pointer dereference in pci_scan_bridge
pci_add_new_bus() calls pci_alloc_child_bus() which calls pci_alloc_bus()
that allocates memory dynamically with kzalloc(). The return value of
kzalloc() is the pointer that's eventually returned from
pci_add_new_bus(), so since kzalloc() can fail and return NULL so can
pci_add_new_bus(). Thus we may end up dereferencing a NULL pointer in
drivers/pci/probe.c::pci_scan_bridge(). Seems to me we should test for
this and bail out if it happens rather than crashing.
Also removed some trailing whitespace that bugged me while looking at
this.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2011-02-08 13:08:05 -08:00
..
2011-01-10 08:51:44 -08:00
2010-10-12 16:53:37 +02:00
2009-02-13 12:01:56 -08:00
2010-07-30 09:47:22 -07:00
2010-07-30 09:47:22 -07:00
2010-10-17 20:03:05 -07:00
2010-08-31 15:28:00 -07:00
2009-07-12 12:22:34 -07:00