summaryrefslogtreecommitdiffstats
path: root/source/components/events/evxfgpe.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/components/events/evxfgpe.c')
-rw-r--r--source/components/events/evxfgpe.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/source/components/events/evxfgpe.c b/source/components/events/evxfgpe.c
index e76b7f1..1ef1916 100644
--- a/source/components/events/evxfgpe.c
+++ b/source/components/events/evxfgpe.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2013, Intel Corp.
+ * Copyright (C) 2000 - 2014, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -791,6 +791,20 @@ AcpiInstallGpeBlock (
goto UnlockAndExit;
}
+ /* Validate the parent device */
+
+ if (Node->Type != ACPI_TYPE_DEVICE)
+ {
+ Status = AE_TYPE;
+ goto UnlockAndExit;
+ }
+
+ if (Node->Object)
+ {
+ Status = AE_ALREADY_EXISTS;
+ goto UnlockAndExit;
+ }
+
/*
* For user-installed GPE Block Devices, the GpeBlockBaseNumber
* is always zero
@@ -884,6 +898,14 @@ AcpiRemoveGpeBlock (
goto UnlockAndExit;
}
+ /* Validate the parent device */
+
+ if (Node->Type != ACPI_TYPE_DEVICE)
+ {
+ Status = AE_TYPE;
+ goto UnlockAndExit;
+ }
+
/* Get the DeviceObject attached to the node */
ObjDesc = AcpiNsGetAttachedObject (Node);
OpenPOWER on IntegriCloud