提交 9a3eda26 编写于 作者: S Sam Bobroff 提交者: Michael Ellerman

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: NSam Bobroff <sbobroff@linux.ibm.com>
Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
上级 1c5c533b
...@@ -456,7 +456,8 @@ int eeh_rmv_from_parent_pe(struct eeh_dev *edev) ...@@ -456,7 +456,8 @@ int eeh_rmv_from_parent_pe(struct eeh_dev *edev)
int cnt; int cnt;
struct pci_dn *pdn = eeh_dev_to_pdn(edev); 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", pr_debug("%s: No PE found for device %04x:%02x:%02x.%01x\n",
__func__, pdn->phb->global_number, __func__, pdn->phb->global_number,
pdn->busno, pdn->busno,
...@@ -466,7 +467,6 @@ int eeh_rmv_from_parent_pe(struct eeh_dev *edev) ...@@ -466,7 +467,6 @@ int eeh_rmv_from_parent_pe(struct eeh_dev *edev)
} }
/* Remove the EEH device */ /* Remove the EEH device */
pe = eeh_dev_to_pe(edev);
edev->pe = NULL; edev->pe = NULL;
list_del(&edev->entry); list_del(&edev->entry);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册