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>
        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,
        }
 
        /* Remove the EEH device */
-       pe = eeh_dev_to_pe(edev);
        edev->pe = NULL;
        list_del(&edev->entry);