summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/eeh_pe.c
diff options
context:
space:
mode:
authorSam Bobroff <sbobroff@linux.ibm.com>2018-09-12 03:23:28 +0200
committerMichael Ellerman <mpe@ellerman.id.au>2018-10-13 13:21:25 +0200
commit9a3eda266fb55fee0e19f2afbbc57607fa379d23 (patch)
tree046b4f58e92e9a686520aaedb6386674d003a407 /arch/powerpc/kernel/eeh_pe.c
parentpowerpc/eeh: Cleanup field names in eeh_rmv_data (diff)
downloadlinux-9a3eda266fb55fee0e19f2afbbc57607fa379d23.tar.xz
linux-9a3eda266fb55fee0e19f2afbbc57607fa379d23.zip
powerpc/eeh: Cleanup logic in eeh_rmv_from_parent_pe()
Move the call to eeh_dev_to_pe() up, so that later it's clear that "pe" isn't NULL. Signed-off-by: Sam Bobroff <sbobroff@linux.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/kernel/eeh_pe.c')
-rw-r--r--arch/powerpc/kernel/eeh_pe.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/eeh_pe.c b/arch/powerpc/kernel/eeh_pe.c
index 7d6d93cd67e1..78f125d24bd0 100644
--- a/arch/powerpc/kernel/eeh_pe.c
+++ b/arch/powerpc/kernel/eeh_pe.c
@@ -456,7 +456,8 @@ int eeh_rmv_from_parent_pe(struct eeh_dev *edev)
int cnt;
struct pci_dn *pdn = eeh_dev_to_pdn(edev);
- if (!edev->pe) {
+ pe = eeh_dev_to_pe(edev);
+ if (!pe) {
pr_debug("%s: No PE found for device %04x:%02x:%02x.%01x\n",
__func__, pdn->phb->global_number,
pdn->busno,
@@ -466,7 +467,6 @@ int eeh_rmv_from_parent_pe(struct eeh_dev *edev)
}
/* Remove the EEH device */
- pe = eeh_dev_to_pe(edev);
edev->pe = NULL;
list_del(&edev->entry);