drm/tegra: gem: Check before freeing CMA memory
authorThierry Reding <treding@nvidia.com>
Thu, 6 Nov 2014 13:41:31 +0000 (14:41 +0100)
committerThierry Reding <treding@nvidia.com>
Thu, 13 Nov 2014 15:18:34 +0000 (16:18 +0100)
dma_free_writecombine() must not be called on a buffer that couldn't be
allocated. Check for a valid virtual address before attempting to free
the memory to avoid a crash.

Reported-by: Sean Paul <seanpaul@chromium.org>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Thierry Reding <treding@nvidia.com>

No differences found