]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mtd: hyperbus: hbmc-am654: fix an OF node reference leak
authorJoe Hattori <joe@pf.is.s.u-tokyo.ac.jp>
Fri, 6 Dec 2024 13:38:09 +0000 (22:38 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Mar 2025 11:50:09 +0000 (12:50 +0100)
commit6f3c167de05763dee0eb225ab47cf112a44cce8d
treecc4089fc1de0aeca1d085af61951fc7762a4c8f2
parent784a7f4a9efb7c1eacef541d168f28e2e58ff303
mtd: hyperbus: hbmc-am654: fix an OF node reference leak

[ Upstream commit bf5821909eb9c7f5d07d5c6e852ead2c373c94a0 ]

In am654_hbmc_platform_driver, .remove() and the error path of .probe()
do not decrement the refcount of an OF node obtained by
  of_get_next_child(). Fix this by adding of_node_put() calls.

Fixes: aca31ce96814 ("mtd: hyperbus: hbmc-am654: Fix direct mapping setup flash access")
Signed-off-by: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/mtd/hyperbus/hbmc-am654.c