]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/pseries/eeh: Fix crash when error happens during device probe
authorThadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
Wed, 11 Jan 2012 09:09:58 +0000 (09:09 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Tue, 14 Feb 2012 04:01:39 +0000 (15:01 +1100)
commit9d295eef4858f39bf2e65b9088b807b56f5f1eb2
tree4f8969fe08df41ced83f44ec9dd459ab10e72d69
parent0667f1a8931b0b6314de8dc64ed8dd1dd48dea89
powerpc/pseries/eeh: Fix crash when error happens during device probe

EEH may happen during a PCI driver probe. If the driver is trying to
access some register in a loop, the EEH code will try to print the
driver name. But the driver pointer in struct pci_dev is not set until
probe returns successfully.

Use a function to test if the device and the driver pointer is NULL
before accessing the driver's name.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/include/asm/ppc-pci.h
arch/powerpc/platforms/pseries/eeh.c