linux/drivers/media/platform/s5p-jpeg
Andrzej Pietrasiewicz 7a1d4e7c06 [media] s5p-jpeg: Eliminate double kfree()
video_unregister_device() calls device_unregister(), which calls
put_device(), which calls kobject_put(), and if this is the last reference
then kobject_release() is called, which calls kobject_cleanup(), which
calls ktype's release method which happens to be device_release() in this
case, which calls dev->release(), which happens to be
v4l2_device_release() in this case, which calls vdev->release(), which
happens to be video_device_release(). But video_device_release() is
called explicitly both in error recovery path of s5p_jpeg_probe() and
in s5p_jpeg_remove(). The pointers in question are not nullified between
the two calls, so this is harmful.

This patch fixes the driver so that video_device_release() is not called
twice for the same object.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-08-11 06:26:14 -03:00
..
Makefile [media] s5p-jpeg: Add support for Exynos3250 SoC 2014-07-30 19:15:06 -03:00
jpeg-core.c [media] s5p-jpeg: Eliminate double kfree() 2015-08-11 06:26:14 -03:00
jpeg-core.h [media] s5p-jpeg: add 5420 family support 2015-04-07 08:14:09 -03:00
jpeg-hw-exynos4.c [media] s5p-jpeg: Fix compilation with COMPILE_TEST 2014-09-09 18:08:07 -03:00
jpeg-hw-exynos4.h [media] s5p-jpeg: JPEG codec 2013-12-18 11:46:23 -02:00
jpeg-hw-exynos3250.c [media] s5p-jpeg: exynos3250: fix erroneous reset procedure 2015-03-04 08:59:34 -03:00
jpeg-hw-exynos3250.h [media] s5p-jpeg: Add support for Exynos3250 SoC 2014-07-30 19:15:06 -03:00
jpeg-hw-s5p.c [media] s5p-jpeg: Remove some unused functions 2015-04-07 08:15:15 -03:00
jpeg-hw-s5p.h [media] s5p-jpeg: Remove some unused functions 2015-04-07 08:15:15 -03:00
jpeg-regs.h [media] s5p-jpeg: Add support for Exynos3250 SoC 2014-07-30 19:15:06 -03:00