[media] exynos4-is: Free FIMC-IS CPU memory only when allocated
authorSylwester Nawrocki <s.nawrocki@samsung.com>
Thu, 8 May 2014 17:35:15 +0000 (14:35 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Fri, 23 May 2014 18:50:17 +0000 (15:50 -0300)
commit404a90abc60f60df2757cb272660e003d326881f
tree1dcbe5e0ceafcce8182cd82b5e22683f3ba8cbf0
parentf486e7c3cb9849b6a661931fa8c51a43d477046b
[media] exynos4-is: Free FIMC-IS CPU memory only when allocated

Ensure dma_free_coherent() is not called with incorrect arguments
and only when the memory was actually allocated. This will prevent
possible crashes on error paths of the top level media device driver,
when fimc-is device gets unregistered and its driver detached.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: stable@vger.kernel.org # for v3.15
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/platform/exynos4-is/fimc-is.c