]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
powerpc/eeh_sysfs: Remove double pci_dn lookup.
authorOliver O'Halloran <oohall@gmail.com>
Mon, 15 Jul 2019 08:56:11 +0000 (18:56 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 23 Jan 2020 10:31:19 +0000 (21:31 +1100)
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
arch/powerpc/kernel/eeh_sysfs.c

index 64a6dd519bf65786cfacee073e4a2634323c66b6..a6638ea5479721736e2045a672365522fa9948f2 100644 (file)
@@ -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);
 }