]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
amba: bus: fix refcount leak
authorPeng Fan <peng.fan@nxp.com>
Mon, 21 Aug 2023 02:39:27 +0000 (10:39 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 Sep 2023 08:46:59 +0000 (10:46 +0200)
commit94e398df32e850f26828690ee62f7441979583cc
tree9dc52d75e0e0a2bb3b7db3b3e9d572b699a5533f
parent73e355bb1c25f57bd727914e31be296741abce30
amba: bus: fix refcount leak

[ Upstream commit e312cbdc11305568554a9e18a2ea5c2492c183f3 ]

commit 5de1540b7bc4 ("drivers/amba: create devices from device tree")
increases the refcount of of_node, but not releases it in
amba_device_release, so there is refcount leak. By using of_node_put
to avoid refcount leak.

Fixes: 5de1540b7bc4 ("drivers/amba: create devices from device tree")
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20230821023928.3324283-1-peng.fan@oss.nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/amba/bus.c