summaryrefslogtreecommitdiffstats
path: root/drivers/media/v4l2-core/v4l2-mem2mem.c
diff options
context:
space:
mode:
authorAndrzej Pietrasiewicz <andrzej.p@samsung.com>2015-07-03 07:04:38 -0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-08-11 06:26:14 -0300
commit7a1d4e7c064c0eddd90f0204cecd294d0dc5b36a (patch)
treee206015d9ee026572683da3a4f41d8b80476e471 /drivers/media/v4l2-core/v4l2-mem2mem.c
parent1af21985473d72965807ef5e5cc02528aa8c01e4 (diff)
downloadlinux-7a1d4e7c064c0eddd90f0204cecd294d0dc5b36a.tar.gz
linux-7a1d4e7c064c0eddd90f0204cecd294d0dc5b36a.tar.bz2
linux-7a1d4e7c064c0eddd90f0204cecd294d0dc5b36a.zip
[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>
Diffstat (limited to 'drivers/media/v4l2-core/v4l2-mem2mem.c')
0 files changed, 0 insertions, 0 deletions