diff options
author | Lan Tianyu <tianyu.lan@intel.com> | 2013-10-15 11:48:11 (GMT) |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-10-15 22:26:42 (GMT) |
commit | d7d49012b917647794b6df33f4e7a61a2c818ccf (patch) | |
tree | e4462bfb43a179b578320b7b931d342fbc272bfc /drivers | |
parent | 35f9162d67c3e20a82b4bd6ec538f3e9c14fb055 (diff) | |
download | linux-d7d49012b917647794b6df33f4e7a61a2c818ccf.tar.xz |
ACPI / power: Release resource_lock after acpi_power_get_state() return error
In acpi_resume_power_resources() resource_lock should be released
when acpi_power_get_state() fails and before passing to next power
resource on the list.
Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/acpi/power.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/acpi/power.c b/drivers/acpi/power.c index 0dbe5cd..0c1c3ec 100644 --- a/drivers/acpi/power.c +++ b/drivers/acpi/power.c @@ -936,8 +936,10 @@ void acpi_resume_power_resources(void) mutex_lock(&resource->resource_lock); result = acpi_power_get_state(resource->device.handle, &state); - if (result) + if (result) { + mutex_unlock(&resource->resource_lock); continue; + } if (state == ACPI_POWER_RESOURCE_STATE_OFF && resource->ref_count) { |