if (!pcidev)
                return -ENODEV;
 
-       if (pci_read_config_dword(pcidev, I5K_REG_AMB_BASE_ADDR, &val32))
+       pci_read_config_dword(pcidev, I5K_REG_AMB_BASE_ADDR, &val32);
+       if (val32 == (u32)~0)
                goto out;
        data->amb_base = val32;
 
-       if (pci_read_config_dword(pcidev, I5K_REG_AMB_LEN_ADDR, &val32))
+       pci_read_config_dword(pcidev, I5K_REG_AMB_LEN_ADDR, &val32);
+       if (val32 == (u32)~0)
                goto out;
        data->amb_len = val32;
 
        if (!pcidev)
                return -ENODEV;
 
-       if (pci_read_config_word(pcidev, I5K_REG_CHAN0_PRESENCE_ADDR, &val16))
+       pci_read_config_word(pcidev, I5K_REG_CHAN0_PRESENCE_ADDR, &val16);
+       if (val16 == (u16)~0)
                goto out;
        amb_present[0] = val16;
 
-       if (pci_read_config_word(pcidev, I5K_REG_CHAN1_PRESENCE_ADDR, &val16))
+       pci_read_config_word(pcidev, I5K_REG_CHAN1_PRESENCE_ADDR, &val16);
+       if (val16 == (u16)~0)
                goto out;
        amb_present[1] = val16;
 
 
                        return -ENODEV;
        }
 
-       if (PCIBIOS_SUCCESSFUL != pci_read_config_word(dev, VT8231_BASE_REG,
-                                                       &val))
+       pci_read_config_word(dev, VT8231_BASE_REG, &val);
+       if (val == (u16)~0)
                return -ENODEV;
 
        address = val & ~(VT8231_EXTENT - 1);
                return -ENODEV;
        }
 
-       if (PCIBIOS_SUCCESSFUL != pci_read_config_word(dev, VT8231_ENABLE_REG,
-                                                       &val))
+       pci_read_config_word(dev, VT8231_ENABLE_REG, &val);
+       if (val == (u16)~0)
                return -ENODEV;
 
        if (!(val & 0x0001)) {