[PATCH 2/2] eeh: fixing pci_dev dependency
Benjamin Herrenschmidt
benh at kernel.crashing.org
Fri Jan 29 11:04:47 EST 2010
On Wed, 2010-01-27 at 12:43 -0600, leitao at linux.vnet.ibm.com wrote:
> 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.
Like all variants of *_put(), it already checks for a NULL argument
afaik. So that patch should be unnecessary.
Cheers,
Ben.
> 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);
>
More information about the Linuxppc-dev
mailing list