diff mbox series

[next] gpiolib-acpi: remove unused variable 'err', cleans up build warning

Message ID 20181218122802.28157-1-colin.king@canonical.com (mailing list archive)
State Not Applicable, archived
Headers show
Series [next] gpiolib-acpi: remove unused variable 'err', cleans up build warning | expand

Commit Message

Colin King Dec. 18, 2018, 12:28 p.m. UTC
From: Colin Ian King <colin.king@canonical.com>

Variable err is defined but never used. Remove it. Cleans up warning:

warning: unused variable ‘err’ [-Wunused-variable]

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/gpio/gpiolib-acpi.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Mika Westerberg Dec. 18, 2018, 12:44 p.m. UTC | #1
On Tue, Dec 18, 2018 at 12:28:02PM +0000, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> Variable err is defined but never used. Remove it. Cleans up warning:
> 
> warning: unused variable ‘err’ [-Wunused-variable]
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Linus Walleij Dec. 21, 2018, 10:31 a.m. UTC | #2
On Tue, Dec 18, 2018 at 1:28 PM Colin King <colin.king@canonical.com> wrote:

> From: Colin Ian King <colin.king@canonical.com>
>
> Variable err is defined but never used. Remove it. Cleans up warning:
>
> warning: unused variable ‘err’ [-Wunused-variable]
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Patch applied with Mika's ACK.

Yours,
Linus Walleij
diff mbox series

Patch

diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c
index fb0496e20ff8..259cf6ab969b 100644
--- a/drivers/gpio/gpiolib-acpi.c
+++ b/drivers/gpio/gpiolib-acpi.c
@@ -908,7 +908,6 @@  acpi_gpio_adr_space_handler(u32 function, acpi_physical_address address,
 		if (!found) {
 			enum gpiod_flags flags = acpi_gpio_to_gpiod_flags(agpio);
 			const char *label = "ACPI:OpRegion";
-			int err;
 
 			desc = gpiochip_request_own_desc(chip, pin, label,
 							 flags);