[PATCH 0/2] hwmon: Fix resource leaks for device_node

Felix Gu posted 2 patches 3 weeks, 3 days ago
drivers/hwmon/emc2305.c | 1 +
drivers/hwmon/nct7363.c | 1 +
2 files changed, 2 insertions(+)
[PATCH 0/2] hwmon: Fix resource leaks for device_node
Posted by Felix Gu 3 weeks, 3 days ago
When calling of_parse_phandle_with_args(), the caller is responsible
to call of_node_put() to release the reference of device node.
In current code, it does not release the reference, causing a resource leak.

Signed-off-by: Felix Gu <gu_0233@qq.com>
---
Felix Gu (2):
      hwmon: emc2305: Fix a resource leak in emc2305_of_parse_pwm_child
      hwmon: nct7353: Fix a resource leak in nct7363_present_pwm_fanin

 drivers/hwmon/emc2305.c | 1 +
 drivers/hwmon/nct7363.c | 1 +
 2 files changed, 2 insertions(+)
---
base-commit: 9b7977f9e39b7768c70c2aa497f04e7569fd3e00
change-id: 20260115-hwmon-fixes-3d29ded39dbf

Best regards,
-- 
Felix Gu <gu_0233@qq.com>
Re: [0/2] hwmon: Fix resource leaks for device_node
Posted by Markus Elfring 3 weeks, 2 days ago
See also:
* hwmon: (emc2305) Fix a resource leak in emc2305_of_parse_pwm_child
  https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git/commit/?h=hwmon-next&id=6b3a30846c23af1b36f1c1726e6ab5d6c9aa90cc

* hwmon: (nct7363) Fix a resource leak in nct7363_present_pwm_fanin
  https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git/commit/?h=hwmon-next&id=e59f0a584366b775e1dee39e183d8b37e6c0443d


I wonder why these commits did not get the tag “Fixes”
together with the “stable” annotation.

Regards,
Markus