[PATCH v2 18/20] pinctrl: freescale: mxs: Fix refcount of child

Markus Elfring Markus.Elfring at web.de
Mon May 27 08:56:43 PDT 2024


How do you think about to use the summary phrase “Fix reference counting for children in mxs_pinctrl_probe_dt()”?


…
> of_get_next_child() will increase refcount …

                                    the reference counter?


> Per current implementation, 'child' will be override by

                                              overridden?


> for_each_child_of_node(np, child), so use of_get_child_count to avoid
> refcount leakage.

Another wording suggestion:
  for_each_child_of_node(np, child). Thus use an of_get_child_count() call
  to avoid reference counting leakage.


Regards,
Markus



More information about the Linux-rockchip mailing list