]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
media: platform: exynos4-is: Fix an OF node reference leak in fimc_md_is_isp_available
authorJoe Hattori <joe@pf.is.s.u-tokyo.ac.jp>
Mon, 4 Nov 2024 10:01:19 +0000 (19:01 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 9 Dec 2024 09:40:59 +0000 (10:40 +0100)
commit36a4bfb5fc676f88e954a09a6072b039001e7d7d
tree980667be4303de2e750c224a68694bdb6636fd2f
parent901070571bc191d1d8d7a1379bc5ba9446200999
media: platform: exynos4-is: Fix an OF node reference leak in fimc_md_is_isp_available

commit 8964eb23408243ae0016d1f8473c76f64ff25d20 upstream.

In fimc_md_is_isp_available(), of_get_child_by_name() is called to check
if FIMC-IS is available. Current code does not decrement the refcount of
the returned device node, which causes an OF node reference leak. Fix it
by calling of_node_put() at the end of the variable scope.

Signed-off-by: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp>
Fixes: e781bbe3fecf ("[media] exynos4-is: Add fimc-is subdevs registration")
Cc: stable@vger.kernel.org
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
[hverkuil: added CC to stable]
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/media/platform/samsung/exynos4-is/media-dev.h