summaryrefslogtreecommitdiff
path: root/source/components/namespace/nsload.c
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2015-08-25 19:41:12 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2015-08-25 19:41:12 +0000
commitc25a97c7b4f09b4c9efa992434d341f5b89629ff (patch)
tree2fa9d2167f719968f73daa4ec16528a068d308ad /source/components/namespace/nsload.c
parent136eac2a0638d3c751b1987603f71a9ae26879fd (diff)
Notes
Diffstat (limited to 'source/components/namespace/nsload.c')
-rw-r--r--source/components/namespace/nsload.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/source/components/namespace/nsload.c b/source/components/namespace/nsload.c
index b6f85ba031ad..f893348e9670 100644
--- a/source/components/namespace/nsload.c
+++ b/source/components/namespace/nsload.c
@@ -128,7 +128,21 @@ AcpiNsLoadTable (
}
else
{
- (void) AcpiTbReleaseOwnerId (TableIndex);
+ /*
+ * On error, delete any namespace objects created by this table.
+ * We cannot initialize these objects, so delete them. There are
+ * a couple of expecially bad cases:
+ * AE_ALREADY_EXISTS - namespace collision.
+ * AE_NOT_FOUND - the target of a Scope operator does not
+ * exist. This target of Scope must already exist in the
+ * namespace, as per the ACPI specification.
+ */
+ (void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);
+ AcpiNsDeleteNamespaceByOwner (
+ AcpiGbl_RootTableList.Tables[TableIndex].OwnerId);
+ AcpiTbReleaseOwnerId (TableIndex);
+
+ return_ACPI_STATUS (Status);
}
Unlock: