diff options
Diffstat (limited to 'drivers/acpi/acpica/evxfgpe.c')
-rw-r--r-- | drivers/acpi/acpica/evxfgpe.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/acpi/acpica/evxfgpe.c b/drivers/acpi/acpica/evxfgpe.c index 5713da77c665..b84f8e25717a 100644 --- a/drivers/acpi/acpica/evxfgpe.c +++ b/drivers/acpi/acpica/evxfgpe.c | |||
@@ -583,6 +583,18 @@ acpi_install_gpe_block(acpi_handle gpe_device, | |||
583 | goto unlock_and_exit; | 583 | goto unlock_and_exit; |
584 | } | 584 | } |
585 | 585 | ||
586 | /* Validate the parent device */ | ||
587 | |||
588 | if (node->type != ACPI_TYPE_DEVICE) { | ||
589 | status = AE_TYPE; | ||
590 | goto unlock_and_exit; | ||
591 | } | ||
592 | |||
593 | if (node->object) { | ||
594 | status = AE_ALREADY_EXISTS; | ||
595 | goto unlock_and_exit; | ||
596 | } | ||
597 | |||
586 | /* | 598 | /* |
587 | * For user-installed GPE Block Devices, the gpe_block_base_number | 599 | * For user-installed GPE Block Devices, the gpe_block_base_number |
588 | * is always zero | 600 | * is always zero |
@@ -666,6 +678,13 @@ acpi_status acpi_remove_gpe_block(acpi_handle gpe_device) | |||
666 | goto unlock_and_exit; | 678 | goto unlock_and_exit; |
667 | } | 679 | } |
668 | 680 | ||
681 | /* Validate the parent device */ | ||
682 | |||
683 | if (node->type != ACPI_TYPE_DEVICE) { | ||
684 | status = AE_TYPE; | ||
685 | goto unlock_and_exit; | ||
686 | } | ||
687 | |||
669 | /* Get the device_object attached to the node */ | 688 | /* Get the device_object attached to the node */ |
670 | 689 | ||
671 | obj_desc = acpi_ns_get_attached_object(node); | 690 | obj_desc = acpi_ns_get_attached_object(node); |