Re: [PATCH 1/5] pinctrl: pistachio: fix leaked of_node references

2019-04-23 Thread Linus Walleij
On Fri, Apr 12, 2019 at 8:01 AM Wen Yang wrote: > The call to of_get_child_by_name returns a node pointer with refcount > incremented thus it must be explicitly decremented after the last > usage. > > Detected by coccinelle with the following warnings: > ./drivers/pinctrl/pinctrl-pistachio.c:1422

Re: [PATCH 1/5] pinctrl: pistachio: fix leaked of_node references

2019-04-14 Thread Markus Elfring
> @@ -1367,6 +1367,7 @@ static int pistachio_gpio_register(struct > pistachio_pinctrl *pctl) > if (!of_find_property(child, "gpio-controller", NULL)) { > dev_err(pctl->dev, > "No gpio-controller property for bank %u\n", i); > +

[PATCH 1/5] pinctrl: pistachio: fix leaked of_node references

2019-04-11 Thread Wen Yang
The call to of_get_child_by_name returns a node pointer with refcount incremented thus it must be explicitly decremented after the last usage. Detected by coccinelle with the following warnings: ./drivers/pinctrl/pinctrl-pistachio.c:1422:1-7: ERROR: missing of_node_put; acquired a node pointer wi