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
..
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
jpeg-hw-exynos4.h
jpeg-hw-exynos3250.c
jpeg-hw-exynos3250.h
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
Makefile