]> git.baikalelectronics.ru Git - kernel.git/commit
hwmon: (gsc-hwmon) Add missing of_node_put()
authorLiang He <windhl@126.com>
Thu, 16 Jun 2022 11:40:24 +0000 (19:40 +0800)
committerGuenter Roeck <linux@roeck-us.net>
Wed, 13 Jul 2022 15:38:20 +0000 (08:38 -0700)
commitf67b5e8b96a866770072d88deddb233d93600ee0
treee4e7c458dda8a4e88b88d4f22354ec429d85cb0c
parentd57fa4a4eaf3e512286190563d116c1cf3447935
hwmon: (gsc-hwmon) Add missing of_node_put()

In gsc_hwmon_get_devtree_pdata(), of_find_compatible_node() will return
a node pointer with refcount incremented. We should use of_node_put() in
fail path or when it is not used anymore.

Signed-off-by: Liang He <windhl@126.com>
Link: https://lore.kernel.org/r/20220616114024.3985770-1-windhl@126.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/gsc-hwmon.c