diff options
| author | Jung-uk Kim <jkim@FreeBSD.org> | 2014-01-15 00:10:20 +0000 |
|---|---|---|
| committer | Jung-uk Kim <jkim@FreeBSD.org> | 2014-01-15 00:10:20 +0000 |
| commit | 39f274c358ed4902e03f3785abb7d32d5ed2bfec (patch) | |
| tree | 454f2ab26ed17be123260e9052adc018fef302dc /source/components/events/evxfgpe.c | |
| parent | 86e94f4ac956e0aed23de30c7a458d215f54749a (diff) | |
Notes
Diffstat (limited to 'source/components/events/evxfgpe.c')
| -rw-r--r-- | source/components/events/evxfgpe.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/source/components/events/evxfgpe.c b/source/components/events/evxfgpe.c index e76b7f1ed3364..1ef191604f61a 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); |
