Hi Harish, second pass, I think the DT review is the most important thing now. On Wed, Jun 19, 2019 at 1:45 PM Harish Jenny K N <harish_kandiga@xxxxxxxxxx> wrote: > +#include <linux/of_gpio.h> Please don't use these old interfaces. Use this: #include <linux/gpio/consumer.h> I'll show more details of that. > + count = of_gpio_named_count(dev->of_node, "inverted-gpios"); count = gpiod_count(dev, "inverted"); > + while (index < count) { > + gpio = devm_gpiod_get_index(dev, "inverted", index, GPIOD_ASIS); > + > + if (gpio == ERR_PTR(-ENOENT)) { > + devm_kfree(dev, inv); I think devm_ i guaranteed to free any allocated memory if probe() fails. Yours, Linus Walleij