summaryrefslogtreecommitdiffstats
path: root/drivers/gpio
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpio')
-rw-r--r--drivers/gpio/gpiolib-acpi.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c
index 83fcfff19cd6..fec93b994fe9 100644
--- a/drivers/gpio/gpiolib-acpi.c
+++ b/drivers/gpio/gpiolib-acpi.c
@@ -866,6 +866,10 @@ static struct gpio_desc *acpi_gpiochip_parse_own_gpio(
u32 gpios[2];
int ret;
+ *lflags = 0;
+ *dflags = 0;
+ *name = NULL;
+
ret = fwnode_property_read_u32_array(fwnode, "gpios", gpios,
ARRAY_SIZE(gpios));
if (ret < 0)
@@ -879,10 +883,6 @@ static struct gpio_desc *acpi_gpiochip_parse_own_gpio(
if (IS_ERR(desc))
return desc;
- *lflags = 0;
- *dflags = 0;
- *name = NULL;
-
if (gpios[1])
*lflags |= GPIO_ACTIVE_LOW;