From 758b423275f0738fa4d382057c03f3d45c12905d Mon Sep 17 00:00:00 2001 From: Oliver O'Halloran Date: Mon, 15 Jul 2019 18:56:11 +1000 Subject: [PATCH] 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 Reviewed-by: Sam Bobroff Tested-by: Sam Bobroff Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20190715085612.8802-5-oohall@gmail.com --- arch/powerpc/kernel/eeh_sysfs.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/powerpc/kernel/eeh_sysfs.c b/arch/powerpc/kernel/eeh_sysfs.c index 64a6dd519bf6..a6638ea54797 100644 --- a/arch/powerpc/kernel/eeh_sysfs.c +++ b/arch/powerpc/kernel/eeh_sysfs.c @@ -86,7 +86,6 @@ static ssize_t eeh_notify_resume_show(struct device *dev, if (!edev || !edev->pe) return -ENODEV; - pdn = pci_get_pdn(pdev); return sprintf(buf, "%d\n", pdn->last_allow_rc); } -- 2.39.5