diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-07-13 17:27:23 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-07-22 22:00:19 -0400 |
commit | 2e862c51904ddd12be2d256513160e1f87beafee (patch) | |
tree | 0f9a98a6cf77be8d473899218dabd16371c89504 | |
parent | 2552002a46cd6a7a262ea1718db33d1a1517008e (diff) |
ACPI / hotplug / PCI: Always return success after adding a function
When a new ACPIPHP function is added by register_slot() and the
notify handler cannot be installed for it, register_slot() returns an
error status without cleaning up, which causes the entire namespace
walk in acpiphp_enumerate_slots() to be aborted, although it still
may be possible to successfully install the function notify handler
for other device objects under the given brigde.
To address this issue make register_slot() return success after
a new function has been added, even if the addition of the notify
handler for it has failed.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com>
-rw-r--r-- | drivers/pci/hotplug/acpiphp_glue.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c index 68c3809ed7ce..d75ba7e0ca8d 100644 --- a/drivers/pci/hotplug/acpiphp_glue.c +++ b/drivers/pci/hotplug/acpiphp_glue.c | |||
@@ -325,10 +325,9 @@ register_slot(acpi_handle handle, u32 lvl, void *context, void **rv) | |||
325 | 325 | ||
326 | if (ACPI_FAILURE(status)) | 326 | if (ACPI_FAILURE(status)) |
327 | err("failed to register interrupt notify handler\n"); | 327 | err("failed to register interrupt notify handler\n"); |
328 | } else | 328 | } |
329 | status = AE_OK; | ||
330 | 329 | ||
331 | return status; | 330 | return AE_OK; |
332 | 331 | ||
333 | err_exit: | 332 | err_exit: |
334 | bridge->nr_slots--; | 333 | bridge->nr_slots--; |