drm/meson: Fix refcount bugs in meson_vpu_has_available_connectors()
stable inclusion from stable-v5.10.138 commit 3aa710e96747c8b4e52ba12ffe09edcb2755897c category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I60QFD Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=3aa710e96747c8b4e52ba12ffe09edcb2755897c -------------------------------- [ Upstream commit 91b3c8db ] 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: bbbe775e ("drm: Add support for Amlogic Meson Graphic Controller") Signed-off-by: NLiang He <windhl@126.com> Acked-by: NMartin Blumenstingl <martin.blumenstingl@googlemail.com> Acked-by: NNeil Armstrong <narmstrong@baylibre.com> Signed-off-by: NNeil Armstrong <narmstrong@baylibre.com> Link: https://patchwork.freedesktop.org/patch/msgid/20220726010722.1319416-1-windhl@126.comSigned-off-by: NSasha Levin <sashal@kernel.org> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com> Reviewed-by: NWei Li <liwei391@huawei.com>
Showing
想要评论请 注册 或 登录