File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1676,19 +1676,24 @@ struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root)
16761676 return NULL ;
16771677
16781678 root_ops = kzalloc (sizeof (* root_ops ), GFP_KERNEL );
1679- if (!root_ops )
1680- goto free_ri ;
1679+ if (!root_ops ) {
1680+ kfree (ri );
1681+ return NULL ;
1682+ }
16811683
16821684 ri -> cfg = pci_acpi_setup_ecam_mapping (root );
1683- if (!ri -> cfg )
1684- goto free_root_ops ;
1685+ if (!ri -> cfg ) {
1686+ kfree (ri );
1687+ kfree (root_ops );
1688+ return NULL ;
1689+ }
16851690
16861691 root_ops -> release_info = pci_acpi_generic_release_info ;
16871692 root_ops -> prepare_resources = pci_acpi_root_prepare_resources ;
16881693 root_ops -> pci_ops = (struct pci_ops * )& ri -> cfg -> ops -> pci_ops ;
16891694 bus = acpi_pci_root_create (root , root_ops , & ri -> common , ri -> cfg );
16901695 if (!bus )
1691- goto free_cfg ;
1696+ return NULL ;
16921697
16931698 /* If we must preserve the resource configuration, claim now */
16941699 host = pci_find_host_bridge (bus );
@@ -1705,14 +1710,6 @@ struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root)
17051710 pcie_bus_configure_settings (child );
17061711
17071712 return bus ;
1708-
1709- free_cfg :
1710- pci_ecam_free (ri -> cfg );
1711- free_root_ops :
1712- kfree (root_ops );
1713- free_ri :
1714- kfree (ri );
1715- return NULL ;
17161713}
17171714
17181715void pcibios_add_bus (struct pci_bus * bus )
You can’t perform that action at this time.
0 commit comments