From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: leitao@linux.vnet.ibm.com
Cc: linuxppc-dev@ozlabs.org, Linas Vepstas <linasvepstas@gmail.com>
Subject: Re: [PATCH 2/2] eeh: fixing pci_dev dependency
Date: Fri, 29 Jan 2010 11:04:47 +1100 [thread overview]
Message-ID: <1264723487.20211.17.camel@pasglop> (raw)
In-Reply-To: <930155d7427ae670cd2add220649c6490f68d0d4.1264617281.git.root@sanx1002.austin.ibm.com>
On Wed, 2010-01-27 at 12:43 -0600, leitao@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@linux.vnet.ibm.com>
> Signed-off-by: Linas Vepstas <linasvepstas@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);
>
next prev parent reply other threads:[~2010-01-29 0:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-27 18:43 [PATCH 1/2] eeh: Fixing a bug when pci structure is null leitao
2010-01-27 18:43 ` [PATCH 2/2] eeh: fixing pci_dev dependency leitao
2010-01-29 0:04 ` Benjamin Herrenschmidt [this message]
2010-01-29 15:42 ` Linas Vepstas
2010-01-27 19:09 ` [PATCH 1/2] eeh: Fixing a bug when pci structure is null Linas Vepstas
2010-01-29 0:03 ` Benjamin Herrenschmidt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1264723487.20211.17.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=leitao@linux.vnet.ibm.com \
--cc=linasvepstas@gmail.com \
--cc=linuxppc-dev@ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.