powerpc/eeh_sysfs: Remove double pci_dn lookup.
In eeh_notify_resume_show() the pci_dn for the device is looked up once in the declaration block and then once after checking for a NULL eeh_dev. Remove the second lookup since it's pointless. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Reviewed-by: Sam Bobroff <sbobroff@linux.ibm.com> Tested-by: Sam Bobroff <sbobroff@linux.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20190715085612.8802-5-oohall@gmail.com
This commit is contained in:
parent
4107248c56
commit
758b423275
@ -86,7 +86,6 @@ static ssize_t eeh_notify_resume_show(struct device *dev,
|
|||||||
if (!edev || !edev->pe)
|
if (!edev || !edev->pe)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
pdn = pci_get_pdn(pdev);
|
|
||||||
return sprintf(buf, "%d\n", pdn->last_allow_rc);
|
return sprintf(buf, "%d\n", pdn->last_allow_rc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user