diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2021-02-24 14:59:17 -0600 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2021-02-24 14:59:17 -0600 |
commit | ce3e292eb703eb2bbe2708f9a59c3947aa99742e (patch) | |
tree | fa6cecd652b9c96a5faf696d596c1a4cb3acc164 /lib/logic_pio.c | |
parent | 7c53f6b671f4aba70ff15e1b05148b10d58c2837 (diff) | |
parent | f6bda644fa3a7070621c3bf12cd657f69a42f170 (diff) |
Merge branch 'pci/enumeration'
- Unexport acpi_pci_osc_control_set() (Bjorn Helgaas)
- Remove unnecessary osc_lock mutex (Bjorn Helgaas)
- Clarify _OSC failure message (Bjorn Helgaas)
- Fix pci-bridge-emul array overruns and improve safety (Russell King)
- Fix pci_register_io_range() memory leak (Geert Uytterhoeven)
* pci/enumeration:
PCI: Fix pci_register_io_range() memory leak
PCI: pci-bridge-emul: Fix array overruns, improve safety
PCI/ACPI: Clarify message about _OSC failure
PCI/ACPI: Remove unnecessary osc_lock
PCI/ACPI: Make acpi_pci_osc_control_set() static
Diffstat (limited to 'lib/logic_pio.c')
-rw-r--r-- | lib/logic_pio.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/logic_pio.c b/lib/logic_pio.c index f32fe481b492..07b4b9a1f54b 100644 --- a/lib/logic_pio.c +++ b/lib/logic_pio.c @@ -28,6 +28,8 @@ static DEFINE_MUTEX(io_range_mutex); * @new_range: pointer to the IO range to be registered. * * Returns 0 on success, the error code in case of failure. + * If the range already exists, -EEXIST will be returned, which should be + * considered a success. * * Register a new IO range node in the IO range list. */ @@ -51,6 +53,7 @@ int logic_pio_register_range(struct logic_pio_hwaddr *new_range) list_for_each_entry(range, &io_range_list, list) { if (range->fwnode == new_range->fwnode) { /* range already there */ + ret = -EEXIST; goto end_register; } if (range->flags == LOGIC_PIO_CPU_MMIO && |