aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/pci_root.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c
index 1f67057af2a5..e10dbafa0569 100644
--- a/drivers/acpi/pci_root.c
+++ b/drivers/acpi/pci_root.c
@@ -378,10 +378,6 @@ acpi_status acpi_pci_osc_control_set(acpi_handle handle, u32 flags)
378 acpi_handle tmp; 378 acpi_handle tmp;
379 struct acpi_pci_root *root; 379 struct acpi_pci_root *root;
380 380
381 status = acpi_get_handle(handle, "_OSC", &tmp);
382 if (ACPI_FAILURE(status))
383 return status;
384
385 control_req = (flags & OSC_PCI_CONTROL_MASKS); 381 control_req = (flags & OSC_PCI_CONTROL_MASKS);
386 if (!control_req) 382 if (!control_req)
387 return AE_TYPE; 383 return AE_TYPE;
@@ -390,6 +386,10 @@ acpi_status acpi_pci_osc_control_set(acpi_handle handle, u32 flags)
390 if (!root) 386 if (!root)
391 return AE_NOT_EXIST; 387 return AE_NOT_EXIST;
392 388
389 status = acpi_get_handle(handle, "_OSC", &tmp);
390 if (ACPI_FAILURE(status))
391 return status;
392
393 mutex_lock(&osc_lock); 393 mutex_lock(&osc_lock);
394 /* No need to evaluate _OSC if the control was already granted. */ 394 /* No need to evaluate _OSC if the control was already granted. */
395 if ((root->osc_control_set & control_req) == control_req) 395 if ((root->osc_control_set & control_req) == control_req)