Skip to content

Commit 814dcce

Browse files
Naveenaidubjorn-helgaas
authored andcommitted
PCI: iproc: Drop error data fabrication when config read fails
If config pci_ops.read() methods return failure, the PCI_OP_READ() and PCI_USER_READ_CONFIG() wrappers use PCI_SET_ERROR_RESPONSE() to set the data value, so there's no need to set it in the pci_ops.read() methods themselves. Drop the unnecessary data value fabrication when pci_ops.read() fails. Link: https://lore.kernel.org/r/b95defa3db834789a4207df5d6b0216c8b610524.1637243717.git.naveennaidu479@gmail.com Signed-off-by: Naveen Naidu <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]>
1 parent 658f7ec commit 814dcce

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/pci/controller/pcie-iproc.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -659,10 +659,8 @@ static int iproc_pci_raw_config_read32(struct iproc_pcie *pcie,
659659
void __iomem *addr;
660660

661661
addr = iproc_pcie_map_cfg_bus(pcie, 0, devfn, where & ~0x3);
662-
if (!addr) {
663-
*val = ~0;
662+
if (!addr)
664663
return PCIBIOS_DEVICE_NOT_FOUND;
665-
}
666664

667665
*val = readl(addr);
668666

0 commit comments

Comments
 (0)