summaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorJavier Carrasco <javier.carrasco.cruz@gmail.com>2024-10-27 13:26:49 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-12-05 14:03:01 +0100
commit8380967174103664c3bf96b62d6215c9dcf8b047 (patch)
tree7d898aa6f9215e78ded1442e093c7ee52dd0f860 /init
parent7d4fb115fbf17f9ffe8f82f7691df8be2f1b06bb (diff)
downloadlinux-8380967174103664c3bf96b62d6215c9dcf8b047.tar.gz
linux-8380967174103664c3bf96b62d6215c9dcf8b047.tar.bz2
linux-8380967174103664c3bf96b62d6215c9dcf8b047.zip
counter: stm32-timer-cnt: fix device_node handling in probe_encoder()
commit 147359e23e5c9652ff8c5a98a51a7323bd51c94a upstream. Device nodes accessed via of_get_compatible_child() require of_node_put() to be called when the node is no longer required to avoid leaving a reference to the node behind, leaking the resource. In this case, the usage of 'tnode' is straightforward and there are no error paths, allowing for a single of_node_put() when 'tnode' is no longer required. Cc: stable@vger.kernel.org Fixes: 29646ee33cc3 ("counter: stm32-timer-cnt: add checks on quadrature encoder capability") Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com> Link: https://lore.kernel.org/r/20241027-stm32-timer-cnt-of_node_put-v1-1-ebd903cdf7ac@gmail.com Signed-off-by: William Breathitt Gray <wbg@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'init')
0 files changed, 0 insertions, 0 deletions