]> git.baikalelectronics.ru Git - kernel.git/commit
hwmon: (nct7802) Add of_node_put() before return
authorWan Jiabing <wanjiabing@vivo.com>
Fri, 29 Oct 2021 02:49:18 +0000 (22:49 -0400)
committerGuenter Roeck <linux@roeck-us.net>
Fri, 29 Oct 2021 04:27:38 +0000 (21:27 -0700)
commit7107427e59bde66e86bcadea7d3517a2fe1cc8d7
treed5aad4fbb2069c2636c4aa8491a24b81fdc2221b
parentdef4c03d3b57c2ecb1c6d39e67b3b89abfa25768
hwmon: (nct7802) Add of_node_put() before return

Fix following coccicheck warning:
./drivers/hwmon/nct7802.c:1152:2-24: WARNING: Function
for_each_child_of_node should have of_node_put() before return.

Early exits from for_each_child_of_node should decrement the
node reference counter.

Signed-off-by: Wan Jiabing <wanjiabing@vivo.com>
Link: https://lore.kernel.org/r/20211029024918.5161-1-wanjiabing@vivo.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/nct7802.c