aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMirela Rabulea <mirela.rabulea@nxp.com>2021-04-06 20:34:28 +0300
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2021-04-07 16:05:55 +0200
commitfad6a06896a2409fec22068ddfe274448f5cd64b (patch)
tree42e8ab56dc9692092073826d86474b4b0325d1f2
parent5ad16315fe2d67bb1be3ad64a465cf58ffdb1707 (diff)
media: imx-jpeg: Fix double free in mxc_jpeg_remove
The video_unregister_device already calls video_device_release, so remove video_device_release, to avoid a double free, when removing the module. This showed up in a repeated rmmod/insmod scenario. Signed-off-by: Mirela Rabulea <mirela.rabulea@nxp.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
-rw-r--r--drivers/media/platform/imx-jpeg/mxc-jpeg.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/media/platform/imx-jpeg/mxc-jpeg.c b/drivers/media/platform/imx-jpeg/mxc-jpeg.c
index c72024078ff8..03b9264af068 100644
--- a/drivers/media/platform/imx-jpeg/mxc-jpeg.c
+++ b/drivers/media/platform/imx-jpeg/mxc-jpeg.c
@@ -2101,7 +2101,6 @@ static int mxc_jpeg_remove(struct platform_device *pdev)
mxc_jpeg_free_slot_data(jpeg, slot);
video_unregister_device(jpeg->dec_vdev);
- video_device_release(jpeg->dec_vdev);
v4l2_m2m_release(jpeg->m2m_dev);
v4l2_device_unregister(&jpeg->v4l2_dev);
mxc_jpeg_detach_pm_domains(jpeg);

Privacy Policy