[RFC PATCH 03/17] bcma: Drop uses of pci_read_config_*() return value

Saheed O. Bolarinwa
2020-08-01T12:25:31Z

drivers/bcma/host_pci.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/bcma/host_pci.c b/drivers/bcma/host_pci.c
index 69c10a7b7c61..912d5311a444 100644
--- a/drivers/bcma/host_pci.c
+++ b/drivers/bcma/host_pci.c
@@ -372,9 +372,11 @@ int bcma_host_pci_irq_ctl(struct bcma_bus *bus, struct bcma_device *core,

pdev = bus->host_pci;

- err = pci_read_config_dword(pdev, BCMA_PCI_IRQMASK, &tmp);
- if (err)
+ pci_read_config_dword(pdev, BCMA_PCI_IRQMASK, &tmp);
+ if (tmp == (u32)~0) {
+ err = -ENODEV;
goto out;
+ }

coremask = BIT(core->core_index) << 8;
if (enable)
--
2.18.4