USB: serial: option: add Fibocom FM101-GL variant
[platform/kernel/linux-rpi.git] / drivers / pci / probe.c
index ab2a4a3..4315996 100644 (file)
@@ -997,6 +997,7 @@ static int pci_register_host_bridge(struct pci_host_bridge *bridge)
                res = window->res;
                if (!res->flags && !res->start && !res->end) {
                        release_resource(res);
+                       resource_list_destroy_entry(window);
                        continue;
                }
 
@@ -1651,15 +1652,15 @@ static void pci_set_removable(struct pci_dev *dev)
 static bool pci_ext_cfg_is_aliased(struct pci_dev *dev)
 {
 #ifdef CONFIG_PCI_QUIRKS
-       int pos;
+       int pos, ret;
        u32 header, tmp;
 
        pci_read_config_dword(dev, PCI_VENDOR_ID, &header);
 
        for (pos = PCI_CFG_SPACE_SIZE;
             pos < PCI_CFG_SPACE_EXP_SIZE; pos += PCI_CFG_SPACE_SIZE) {
-               if (pci_read_config_dword(dev, pos, &tmp) != PCIBIOS_SUCCESSFUL
-                   || header != tmp)
+               ret = pci_read_config_dword(dev, pos, &tmp);
+               if ((ret != PCIBIOS_SUCCESSFUL) || (header != tmp))
                        return false;
        }