[PATCH] acpi: pm: del init error to 0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The init action consume additional CPU cycles. the
acpi_enable_wakeup_device_power should assign a value
to 'error' before it is read.so the var don't need init
to 0.

Signed-off-by: Li Jun <lijun01@xxxxxxxxxx>
---
 drivers/acpi/device_pm.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/acpi/device_pm.c b/drivers/acpi/device_pm.c
index dbd4446025ec..f77042c930a7 100644
--- a/drivers/acpi/device_pm.c
+++ b/drivers/acpi/device_pm.c
@@ -851,7 +851,6 @@ static int __acpi_device_wakeup_enable(struct acpi_device *adev,
 {
 	struct acpi_device_wakeup *wakeup = &adev->wakeup;
 	acpi_status status;
-	int error = 0;
 
 	mutex_lock(&acpi_wakeup_lock);
 
@@ -864,7 +863,7 @@ static int __acpi_device_wakeup_enable(struct acpi_device *adev,
 	if (wakeup->enable_count > 0)
 		acpi_disable_wakeup_device_power(adev);
 
-	error = acpi_enable_wakeup_device_power(adev, target_state);
+	int error = acpi_enable_wakeup_device_power(adev, target_state);
 	if (error) {
 		if (wakeup->enable_count > 0) {
 			acpi_disable_gpe(wakeup->gpe_device, wakeup->gpe_number);
-- 
2.25.1





[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]
  Powered by Linux