]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/tegra: rgb: Fix the unbound reference count
authorBiju Das <biju.das.jz@bp.renesas.com>
Wed, 5 Feb 2025 11:21:35 +0000 (11:21 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Jun 2025 10:07:08 +0000 (11:07 +0100)
commitede81d0303aa7debb12635f6c019cd8d918ce960
treed0a5aba2247e8c39625345bd4a6b809a423723ef
parent7d2fc3c29cfa54d4682f1669c22e6dcb7ceb497e
drm/tegra: rgb: Fix the unbound reference count

[ Upstream commit 3c3642335065c3bde0742b0edc505b6ea8fdc2b3 ]

The of_get_child_by_name() increments the refcount in tegra_dc_rgb_probe,
but the driver does not decrement the refcount during unbind. Fix the
unbound reference count using devm_add_action_or_reset() helper.

Fixes: d8f4a9eda006 ("drm: Add NVIDIA Tegra20 support")
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20250205112137.36055-1-biju.das.jz@bp.renesas.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/tegra/rgb.c