diff options
author | Lan Tianyu <tianyu.lan@intel.com> | 2013-10-15 19:48:11 +0800 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-10-16 00:26:42 +0200 |
commit | d7d49012b917647794b6df33f4e7a61a2c818ccf (patch) | |
tree | e4462bfb43a179b578320b7b931d342fbc272bfc /drivers/acpi/power.c | |
parent | 35f9162d67c3e20a82b4bd6ec538f3e9c14fb055 (diff) | |
download | linux-d7d49012b917647794b6df33f4e7a61a2c818ccf.tar.gz linux-d7d49012b917647794b6df33f4e7a61a2c818ccf.tar.bz2 linux-d7d49012b917647794b6df33f4e7a61a2c818ccf.zip |
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/acpi/power.c')
-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 0dbe5cdf3396..0c1c3ec784fb 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) { |