]> git.baikalelectronics.ru Git - kernel.git/commit
drm/meson: Fix refcount bugs in meson_vpu_has_available_connectors()
authorLiang He <windhl@126.com>
Tue, 26 Jul 2022 01:07:22 +0000 (09:07 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Aug 2022 09:18:31 +0000 (11:18 +0200)
commit0d4e4d2d20f0c19957a130a06760f893d97718d6
treeaff6ad323d81654213e67c38ac72cbf8d54a4db3
parentdcee3e820d1dd34f136f41d8c98df620fa581e5d
drm/meson: Fix refcount bugs in meson_vpu_has_available_connectors()

[ Upstream commit 62250e1711304e28b2a8056ac6ca1f61c63ef915 ]

In this function, there are two refcount leak bugs:
(1) when breaking out of for_each_endpoint_of_node(), we need call
the of_node_put() for the 'ep';
(2) we should call of_node_put() for the reference returned by
of_graph_get_remote_port() when it is not used anymore.

Fixes: a4017a8e1b77 ("drm: Add support for Amlogic Meson Graphic Controller")
Signed-off-by: Liang He <windhl@126.com>
Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Acked-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220726010722.1319416-1-windhl@126.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/meson/meson_drv.c