On Wed, 2010-01-27 at 12:43 -0600, lei...@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 <lei...@linux.vnet.ibm.com>
> Signed-off-by: Linas Vepstas <linasveps...@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);
>  


_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Reply via email to