Skip to content

Commit 479ac41

Browse files
andy-shevBartosz Golaszewski
authored andcommitted
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 <[email protected]> Fixes: 16ba046 ("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]>
1 parent fc36341 commit 479ac41

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/gpio/gpiolib-acpi.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -951,6 +951,7 @@ static struct gpio_desc *acpi_get_gpiod_from_data(struct fwnode_handle *fwnode,
951951
if (!propname)
952952
return ERR_PTR(-EINVAL);
953953

954+
memset(&lookup, 0, sizeof(lookup));
954955
lookup.index = index;
955956

956957
ret = acpi_gpio_property_lookup(fwnode, propname, index, &lookup);

0 commit comments

Comments
 (0)