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>
This commit is contained in:
parent
35f9162d67
commit
d7d49012b9
@ -936,8 +936,10 @@ void acpi_resume_power_resources(void)
|
|||||||
mutex_lock(&resource->resource_lock);
|
mutex_lock(&resource->resource_lock);
|
||||||
|
|
||||||
result = acpi_power_get_state(resource->device.handle, &state);
|
result = acpi_power_get_state(resource->device.handle, &state);
|
||||||
if (result)
|
if (result) {
|
||||||
|
mutex_unlock(&resource->resource_lock);
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (state == ACPI_POWER_RESOURCE_STATE_OFF
|
if (state == ACPI_POWER_RESOURCE_STATE_OFF
|
||||||
&& resource->ref_count) {
|
&& resource->ref_count) {
|
||||||
|
Loading…
Reference in New Issue
Block a user