]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
watchdog: rti_wdt: Fix an OF node leak in rti_wdt_probe()
authorJoe Hattori <joe@pf.is.s.u-tokyo.ac.jp>
Sun, 5 Jan 2025 11:17:18 +0000 (20:17 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 8 Feb 2025 09:02:02 +0000 (10:02 +0100)
commitd89daf94506ebb6d6ef5db6045d39684e2c3e133
tree6824e27fa466f4f1856fb1b06d6c4633fb95e60f
parent57472ff9d1aab78db25093182538a0dd7487f760
watchdog: rti_wdt: Fix an OF node leak in rti_wdt_probe()

[ Upstream commit 143981aa63f33d469a55a55fd9fb81cd90109672 ]

rti_wdt_probe() does not release the OF node reference obtained by
of_parse_phandle(). Add a of_node_put() call.

This was found by an experimental verification tool that I am
developing. Due to the lack of the actual device, no runtime test was
able to be performed.

Fixes: f20ca595ae23 ("watchdog:rit_wdt: Add support for WDIOF_CARDRESET")
Signed-off-by: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20250105111718.4184192-1-joe@pf.is.s.u-tokyo.ac.jp
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/watchdog/rti_wdt.c