diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2023-10-19 20:34:55 +0300 |
---|---|---|
committer | Bartosz Golaszewski <bartosz.golaszewski@linaro.org> | 2023-10-20 11:24:16 +0200 |
commit | 479ac419206b5fe4ce4e40de61ac3210a36711aa (patch) | |
tree | ae1393dd2c69bc50c4827bd6c259e59e0a08d54f /drivers/gpio/gpiolib-acpi.c | |
parent | fc363413ef8ea842ae7a99e3caf5465dafdd3a49 (diff) | |
download | linux-stable-479ac419206b5fe4ce4e40de61ac3210a36711aa.tar.gz linux-stable-479ac419206b5fe4ce4e40de61ac3210a36711aa.tar.bz2 linux-stable-479ac419206b5fe4ce4e40de61ac3210a36711aa.zip |
gpiolib: acpi: Add missing memset(0) to acpi_get_gpiod_from_data()
When refactoring the acpi_get_gpiod_from_data() the change missed
cleaning up the variable on stack. Add missing memset().
Reported-by: Ferry Toth <ftoth@exalondelft.nl>
Fixes: 16ba046e86e9 ("gpiolib: acpi: teach acpi_find_gpio() to handle data-only nodes")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Diffstat (limited to 'drivers/gpio/gpiolib-acpi.c')
-rw-r--r-- | drivers/gpio/gpiolib-acpi.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c index fbda452fb4d6..51e41676de0b 100644 --- a/drivers/gpio/gpiolib-acpi.c +++ b/drivers/gpio/gpiolib-acpi.c @@ -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); |