]> git.baikalelectronics.ru Git - kernel.git/commit
drm/tegra: Fix error handling cleanup
authorThierry Reding <treding@nvidia.com>
Thu, 6 Nov 2014 13:12:08 +0000 (14:12 +0100)
committerThierry Reding <treding@nvidia.com>
Thu, 13 Nov 2014 15:14:48 +0000 (16:14 +0100)
commit8b4a658b54a8cf048adb9ac7a801b19abb06e1cb
tree404e5b43d88a459e749d0a749ff41b6eebf5b9fc
parentffba1733effbc7e74a3849707f4519a8b1c00f68
drm/tegra: Fix error handling cleanup

The DRM driver's ->load() implementation didn't do a good job (no job at
all really) cleaning up on failure. Fix that by undoing any prior setup
when an error occurs. This requires a bit of rework to make it possible
to clean up fbdev midway.

This was tested by injecting errors at various points during the
initialization sequence and verifying that error cleanup didn't crash
and no memory leaked (using kmemleak).

Reported-by: Stéphane Marchesin <marcheu@chromium.org>
Reported-by: Sean Paul <seanpaul@chromium.org>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/gpu/drm/tegra/drm.c
drivers/gpu/drm/tegra/drm.h
drivers/gpu/drm/tegra/fb.c