Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
[firefly-linux-kernel-4.4.55.git] / drivers / acpi / acpica / hwregs.c
index 55accb7018bb24776f32541fddfe7cf7498383f8..cc70f3fdcdd1a0f1d4222f6f7e6a84ca9ff7ebf5 100644 (file)
@@ -269,16 +269,17 @@ acpi_status acpi_hw_clear_acpi_status(void)
 
        status = acpi_hw_register_write(ACPI_REGISTER_PM1_STATUS,
                                        ACPI_BITMASK_ALL_FIXED_STATUS);
-       if (ACPI_FAILURE(status)) {
-               goto unlock_and_exit;
-       }
+
+       acpi_os_release_lock(acpi_gbl_hardware_lock, lock_flags);
+
+       if (ACPI_FAILURE(status))
+               goto exit;
 
        /* Clear the GPE Bits in all GPE registers in all GPE blocks */
 
        status = acpi_ev_walk_gpe_list(acpi_hw_clear_gpe_block, NULL);
 
-      unlock_and_exit:
-       acpi_os_release_lock(acpi_gbl_hardware_lock, lock_flags);
+exit:
        return_ACPI_STATUS(status);
 }