linux/drivers/counter
Javier Carrasco 8380967174 counter: stm32-timer-cnt: fix device_node handling in probe_encoder()
commit 147359e23e 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: 29646ee33c ("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>
History 2024-12-05 14:03:01 +01:00
..
104-quad-8.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
counter-chrdev.c [tree-wide] finally take no_llseek out 2024-09-27 08:18:43 -07:00
counter-chrdev.h counter: Add character device interface 2021-10-17 10:53:52 +01:00
counter-core.c counter: constify the struct device_type usage 2024-04-02 13:10:34 -04:00
counter-sysfs.c counter: i8254: Introduce the Intel 8254 interface library module 2023-06-08 10:11:17 -04:00
counter-sysfs.h counter: Internalize sysfs interface code 2021-10-17 10:52:58 +01:00
ftm-quaddec.c counter: ftm-quaddec: add missing MODULE_DESCRIPTION() macro 2024-07-01 10:29:47 +09:00
i8254.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
intel-qep.c counter: Move symbols into COUNTER namespace 2022-09-30 14:32:35 +02:00
interrupt-cnt.c counter: interrupt-cnt: Implement watch_validate callback 2022-09-30 14:32:35 +02:00
Kconfig counter: ti-eqep: Allow eQEP driver to be built for K3 devices 2024-07-01 19:05:42 +09:00
Makefile counter: i8254: Introduce the Intel 8254 interface library module 2023-06-08 10:11:17 -04:00
microchip-tcb-capture.c First set of Counter fixes for 6.6 2023-10-02 13:13:15 +02:00
rz-mtu3-cnt.c counter: rz-mtu3-cnt: Reorder locking sequence for consistency 2023-08-16 09:41:29 -04:00
stm32-lptimer-cnt.c counter: stm32-lptimer-cnt: fix the check on arr and cmp registers update 2022-11-26 16:49:28 -05:00
stm32-timer-cnt.c counter: stm32-timer-cnt: fix device_node handling in probe_encoder() 2024-12-05 14:03:01 +01:00
ti-ecap-capture.c counter: ti-ecap-capture: Add check for clk_enable() 2024-12-05 14:02:38 +01:00
ti-eqep.c counter/ti-eqep: Add new ti-am62-eqep compatible 2024-07-01 10:40:27 +09:00