drm/tegra: gr2d: Properly clean up resources
authorThierry Reding <treding@nvidia.com>
Fri, 4 May 2018 12:58:26 +0000 (14:58 +0200)
committerThierry Reding <treding@nvidia.com>
Fri, 4 May 2018 15:07:22 +0000 (17:07 +0200)
commitdd99b4b48833a55817d78a48034b606664b1fff8
treee0ecab4a6311c16bfd92d3c33aef849babc6bd96
parentfd5ec0dc34dafa6c5bb46770ca283ae90a4db3c7
drm/tegra: gr2d: Properly clean up resources

Failure to register the Tegra DRM client would leak the resources. Move
cleanup code to error unwinding gotos to fix that and share the cleanup
code with the other error paths.

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