[PATCH 2/2] eeh: fixing pci_dev dependency
leitao at linux.vnet.ibm.com
leitao at linux.vnet.ibm.com
Thu Jan 28 05:43:05 EST 2010
Currently pci_dev can be null when EEH is in action. This patch
just assure that we pci_dev is not NULL before calling pci_dev_put.
Signed-off-by: Breno Leitao <leitao at linux.vnet.ibm.com>
Signed-off-by: Linas Vepstas <linasvepstas at gmail.com>
---
arch/powerpc/platforms/pseries/eeh_event.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/arch/powerpc/platforms/pseries/eeh_event.c b/arch/powerpc/platforms/pseries/eeh_event.c
index ec5df8f..7956e46 100644
--- a/arch/powerpc/platforms/pseries/eeh_event.c
+++ b/arch/powerpc/platforms/pseries/eeh_event.c
@@ -85,7 +85,8 @@ static int eeh_event_handler(void * dummy)
pdn = handle_eeh_events(event);
eeh_clear_slot(event->dn, EEH_MODE_RECOVERING);
- pci_dev_put(event->dev);
+ if (event->dev)
+ pci_dev_put(event->dev);
kfree(event);
mutex_unlock(&eeh_event_mutex);
--
1.6.0.2
More information about the Linuxppc-dev
mailing list