[media] V4L: soc-camera: explicitly free allocated managed memory on error
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Sat, 3 May 2014 16:05:08 +0000 (13:05 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Tue, 17 Jun 2014 15:04:52 +0000 (12:04 -0300)
devm_kzalloc() allocations are freed when the device is unbound. But if a
certain path fails and the allocated memory cannot be used anyway it is
better to free it explicitly immediately. This patch does exactly this if
asynchronous group probing in scan_async_group() fails after memory has
been allocated.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/platform/soc_camera/soc_camera.c