]> Git Repo - linux.git/commitdiff
gpiolib: acpi: Add missing memset(0) to acpi_get_gpiod_from_data()
authorAndy Shevchenko <[email protected]>
Thu, 19 Oct 2023 17:34:55 +0000 (20:34 +0300)
committerBartosz Golaszewski <[email protected]>
Fri, 20 Oct 2023 09:24:16 +0000 (11:24 +0200)
When refactoring the acpi_get_gpiod_from_data() the change missed
cleaning up the variable on stack. Add missing memset().

Reported-by: Ferry Toth <[email protected]>
Fixes: 16ba046e86e9 ("gpiolib: acpi: teach acpi_find_gpio() to handle data-only nodes")
Signed-off-by: Andy Shevchenko <[email protected]>
Reviewed-by: Dmitry Torokhov <[email protected]>
Signed-off-by: Bartosz Golaszewski <[email protected]>
drivers/gpio/gpiolib-acpi.c

index fbda452fb4d6afd4154d4f9e219b3b0cfb434e1a..51e41676de0b8df597a7d9afd493165863e5b053 100644 (file)
@@ -951,6 +951,7 @@ static struct gpio_desc *acpi_get_gpiod_from_data(struct fwnode_handle *fwnode,
        if (!propname)
                return ERR_PTR(-EINVAL);
 
+       memset(&lookup, 0, sizeof(lookup));
        lookup.index = index;
 
        ret = acpi_gpio_property_lookup(fwnode, propname, index, &lookup);
This page took 0.046818 seconds and 4 git commands to generate.