drm/tegra: dc: Properly cleanup overlay planes
authorThierry Reding <treding@nvidia.com>
Mon, 8 Jan 2018 15:16:06 +0000 (16:16 +0100)
committerThierry Reding <treding@nvidia.com>
Mon, 8 Jan 2018 15:24:13 +0000 (16:24 +0100)
commit8f62142e490d761ceb92b55a7c05bb79294d6c6c
treef60600d739b1e26a0a2b4a96e33f06b1473fc08e
parent89f6501825b5bae3d4aaa2447636f9d3a4287a75
drm/tegra: dc: Properly cleanup overlay planes

The first overlay plane can leak if initialization of the second overlay
plane fails. Fix this by properly destroying the first overlay plane on
error.

Suggested-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/gpu/drm/tegra/dc.c