Re: [PATCH v2 2/3] input: keyboard: gpio_keys_polled: use gpio lookup table

From: Sven Van Asbroeck
Date: Fri Apr 26 2019 - 16:16:34 EST


On Fri, Apr 26, 2019 at 3:03 PM Enrico Weigelt, metux IT consult
<info@xxxxxxxxx> wrote:
>
> +static struct gpio_desc *gpio_keys_polled_get_gpiod_fwnode(
> + struct device *dev,
> + int idx,
> + const char *desc)
> +{
> + struct gpio_desc *gpiod;
> + struct fwnode_handle *child;
> + int x;
> +
> + /* get the idx'th child node */
> + child = device_get_next_child_node(dev, NULL);
> + while (child && x) {
> + child = device_get_next_child_node(dev, child);
> + x--;
> + }

x is uninitialized here.