Skip to content

Commit c29008e

Browse files
committed
Merge branch 'pci/misc'
- Fix whitespace issues (Li Jun) - Fix pci_acpi_preserve_config() memory leak (Nirmoy Das) * pci/misc: PCI/ACPI: Fix pci_acpi_preserve_config() memory leak
2 parents 1bffb51 + fac679d commit c29008e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

drivers/pci/pci-acpi.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,8 @@ phys_addr_t acpi_pci_root_get_mcfg_addr(acpi_handle handle)
122122

123123
bool pci_acpi_preserve_config(struct pci_host_bridge *host_bridge)
124124
{
125+
bool ret = false;
126+
125127
if (ACPI_HANDLE(&host_bridge->dev)) {
126128
union acpi_object *obj;
127129

@@ -135,11 +137,11 @@ bool pci_acpi_preserve_config(struct pci_host_bridge *host_bridge)
135137
1, DSM_PCI_PRESERVE_BOOT_CONFIG,
136138
NULL, ACPI_TYPE_INTEGER);
137139
if (obj && obj->integer.value == 0)
138-
return true;
140+
ret = true;
139141
ACPI_FREE(obj);
140142
}
141143

142-
return false;
144+
return ret;
143145
}
144146

145147
/* _HPX PCI Setting Record (Type 0); same as _HPP */

0 commit comments

Comments
 (0)