]> git.baikalelectronics.ru Git - kernel.git/commit
rtc: gamecube: Fix refcount leak in gamecube_rtc_read_offset_from_sram
authorMiaoqian Lin <linmq006@gmail.com>
Wed, 9 Mar 2022 09:22:25 +0000 (09:22 +0000)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Tue, 29 Mar 2022 20:45:50 +0000 (22:45 +0200)
commitf74e440b584cc133f56630228d1c072b354c3ba5
tree5b62ad8e7fb0bec7ef3037df56d44be4d3020498
parent590a8322275928be66434760a18ec9266b5cba50
rtc: gamecube: Fix refcount leak in gamecube_rtc_read_offset_from_sram

The of_find_compatible_node() function returns a node pointer with
refcount incremented, We should use of_node_put() on it when done
Add the missing of_node_put() to release the refcount.

Fixes: 0b1ba0cbb73c ("rtc: gamecube: Add a RTC driver for the GameCube, Wii and Wii U")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20220309092225.6930-1-linmq006@gmail.com
drivers/rtc/rtc-gamecube.c