]> git.baikalelectronics.ru Git - kernel.git/commit
watchdog: ts4800_wdt: Fix refcount leak in ts4800_wdt_probe
authorMiaoqian Lin <linmq006@gmail.com>
Wed, 11 May 2022 11:42:03 +0000 (15:42 +0400)
committerWim Van Sebroeck <wim@linux-watchdog.org>
Sat, 21 May 2022 08:09:31 +0000 (10:09 +0200)
commita61ad76354dbe01f98d85cf3666bdc5d05e1cb2c
tree0672c4f295de6befc7377d3435334ec0fb2c39dc
parent8783b8c2889f32aa0224ecc5dc4006f3757f9afa
watchdog: ts4800_wdt: Fix refcount leak in ts4800_wdt_probe

of_parse_phandle() returns a node pointer with refcount
incremented, we should use of_node_put() on it when done.
Add  missing of_node_put() in some error paths.

Fixes: f78eab4bceaf ("watchdog: ts4800: add driver for TS-4800 watchdog")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20220511114203.47420-1-linmq006@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
drivers/watchdog/ts4800_wdt.c