]> Pileus Git - ~andy/linux/blobdiff - drivers/acpi/ec.c
ACPI / EC: disable GPE before removing GPE handler
[~andy/linux] / drivers / acpi / ec.c
index ba5b56db9d27c7fafa3b19c6d1f5d2549308aea6..7dac048e8f07a9737ffaa37b90fa80b071c38e12 100644 (file)
@@ -779,9 +779,9 @@ static int ec_install_handlers(struct acpi_ec *ec)
                        pr_err("Fail in evaluating the _REG object"
                                " of EC device. Broken bios is suspected.\n");
                } else {
+                       acpi_disable_gpe(NULL, ec->gpe);
                        acpi_remove_gpe_handler(NULL, ec->gpe,
                                &acpi_ec_gpe_handler);
-                       acpi_disable_gpe(NULL, ec->gpe);
                        return -ENODEV;
                }
        }