drm/omap: dss: Fix refcount leak bugs
authorLiang He <windhl@126.com>
Fri, 22 Jul 2022 14:43:48 +0000 (22:43 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Oct 2022 10:34:54 +0000 (12:34 +0200)
commita5ce83e85d795ec98697039ecc518b21d5810adc
tree3ddcfc98cfd648acade4ecb34d512e0d4468359b
parentf5f599daa0bcb555cb4bc04f7d031a07225b9789
drm/omap: dss: Fix refcount leak bugs

[ Upstream commit 8b42057e62120813ebe9274f508fa785b7cab33a ]

In dss_init_ports() and __dss_uninit_ports(), we should call
of_node_put() for the reference returned by of_graph_get_port_by_id()
in fail path or when it is not used anymore.

Fixes: 09bffa6e5192 ("drm: omap: use common OF graph helpers")
Signed-off-by: Liang He <windhl@126.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220722144348.1306569-1-windhl@126.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/omapdrm/dss/dss.c