summaryrefslogtreecommitdiff
path: root/drivers/pci
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2021-09-02 22:56:41 +0300
committerBjorn Helgaas <bhelgaas@google.com>2021-09-02 22:56:41 +0300
commit4f6f0b86d3605464865e9a9d60b5e88f88f03783 (patch)
treedfbedfb7b043ce45e0220ca243b0e1ac0065f4ea /drivers/pci
parent52d44f3c61975cacfa2379a94e470b33a7639e73 (diff)
parentfaa2e05ad0dccf37f995bcfbb8d1980d66c02c11 (diff)
downloadlinux-4f6f0b86d3605464865e9a9d60b5e88f88f03783.tar.xz
Merge branch 'pci/hotplug'
- Fix ibmphp double unmap of io_mem (Vishal Aslot) * pci/hotplug: PCI: ibmphp: Fix double unmap of io_mem
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/hotplug/TODO3
-rw-r--r--drivers/pci/hotplug/ibmphp_ebda.c5
2 files changed, 1 insertions, 7 deletions
diff --git a/drivers/pci/hotplug/TODO b/drivers/pci/hotplug/TODO
index a32070be5adf..cc6194aa24c1 100644
--- a/drivers/pci/hotplug/TODO
+++ b/drivers/pci/hotplug/TODO
@@ -40,9 +40,6 @@ ibmphp:
* The return value of pci_hp_register() is not checked.
-* iounmap(io_mem) is called in the error path of ebda_rsrc_controller()
- and once more in the error path of its caller ibmphp_access_ebda().
-
* The various slot data structures are difficult to follow and need to be
simplified. A lot of functions are too large and too complex, they need
to be broken up into smaller, manageable pieces. Negative examples are
diff --git a/drivers/pci/hotplug/ibmphp_ebda.c b/drivers/pci/hotplug/ibmphp_ebda.c
index 11a2661dc062..7fb75401ad8a 100644
--- a/drivers/pci/hotplug/ibmphp_ebda.c
+++ b/drivers/pci/hotplug/ibmphp_ebda.c
@@ -714,8 +714,7 @@ static int __init ebda_rsrc_controller(void)
/* init hpc structure */
hpc_ptr = alloc_ebda_hpc(slot_num, bus_num);
if (!hpc_ptr) {
- rc = -ENOMEM;
- goto error_no_hpc;
+ return -ENOMEM;
}
hpc_ptr->ctlr_id = ctlr_id;
hpc_ptr->ctlr_relative_id = ctlr;
@@ -910,8 +909,6 @@ error:
kfree(tmp_slot);
error_no_slot:
free_ebda_hpc(hpc_ptr);
-error_no_hpc:
- iounmap(io_mem);
return rc;
}