From: Rafael J. Wysocki <rjw@xxxxxxx> If turning on a power resource fails, do not reference count it, since it cannot be in use in that case. Signed-off-by: Rafael J. Wysocki <rjw@xxxxxxx> Signed-off-by: Len Brown <len.brown@xxxxxxxxx> --- 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 792a830..4c9c2fb 100644 --- a/drivers/acpi/power.c +++ b/drivers/acpi/power.c @@ -213,11 +213,13 @@ static int acpi_power_on(acpi_handle handle) resource->name)); } else { result = __acpi_power_on(resource); + if (result) + resource->ref_count--; } mutex_unlock(&resource->resource_lock); - return 0; + return result; } static int acpi_power_off_device(acpi_handle handle) -- 1.7.3.3.480.g2f76a -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html