[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210526141252.3750231-1-colin.king@canonical.com>
Date: Wed, 26 May 2021 15:12:52 +0100
From: Colin King <colin.king@...onical.com>
To: "Rafael J . Wysocki" <rjw@...ysocki.net>,
Len Brown <lenb@...nel.org>, linux-acpi@...r.kernel.org
Cc: kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH][next] acpi: power: remove redundant initialization of variable result
From: Colin Ian King <colin.king@...onical.com>
The variable result is being initialized with a value that is never
read, it is being updated later on. The assignment is redundant and
can be removed.
Signed-off-by: Colin Ian King <colin.king@...onical.com>
---
drivers/acpi/power.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/acpi/power.c b/drivers/acpi/power.c
index 97c9a94a1a30..d86865c04f64 100644
--- a/drivers/acpi/power.c
+++ b/drivers/acpi/power.c
@@ -919,7 +919,7 @@ struct acpi_device *acpi_add_power_resource(acpi_handle handle)
union acpi_object acpi_object;
struct acpi_buffer buffer = { sizeof(acpi_object), &acpi_object };
acpi_status status;
- int state, result = -ENODEV;
+ int state, result;
acpi_bus_get_device(handle, &device);
if (device)
--
2.31.1
Powered by blists - more mailing lists