Thread (2 messages) flat view 2 messages, 2 authors, 2021-01-25

Re: [PATCH] PCI: mediatek: Add missing of_node_put() to fix reference leak

From: Lorenzo Pieralisi <hidden>
Date: 2021-01-25 17:36:25
Also in: linux-mediatek, linux-pci

On Wed, 20 Jan 2021 18:48:10 +0000, Krzysztof Wilczyński wrote:
The for_each_available_child_of_node helper internally makes use of the
of_get_next_available_child() which performs an of_node_get() on each
iteration when searching for next available child node.

Should an available child node be found, then it would return a device
node pointer with reference count incremented, thus early return from
the middle of the loop requires an explicit of_node_put() to prevent
reference count leak.

[...]
Applied to pci/mediatek, thanks!

[1/1] PCI: mediatek: Add missing of_node_put() to fix reference leak
      https://git.kernel.org/lpieralisi/pci/c/42814c438a

Thanks,
Lorenzo

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help