drm/tegra: sor: Fix AUX device reference leak
authorThierry Reding <treding@nvidia.com>
Thu, 27 May 2021 18:09:08 +0000 (20:09 +0200)
committerThierry Reding <treding@nvidia.com>
Thu, 27 May 2021 18:11:13 +0000 (20:11 +0200)
commitb79b6081c440c0c197a3e8a51e8b9cf343fb210f
treea0a5fde150c1963327e1b672cb19cb151465f551
parent1d15a10395e5a036f571ac727f202f9572e255f9
drm/tegra: sor: Fix AUX device reference leak

In the case where the AUX provides an I2C-over-AUX DDC channel, a
reference is taken on the AUX parent device of the DDC channel rather
than the DDC channel like it would be for regular I2C controllers. To
make sure the correct reference is dropped, move the unreferencing code
into the SOR driver and make sure not to drop the I2C adapter reference
in that case.

Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/gpu/drm/tegra/output.c
drivers/gpu/drm/tegra/sor.c