diff options
author | Mirela Rabulea <mirela.rabulea@nxp.com> | 2021-04-06 19:34:28 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2021-04-09 12:54:49 +0200 |
commit | 7385209770fcb29f31e713e0c3db6a16f51cb8b9 (patch) | |
tree | dd60c2b622f10a234d23c739ef0e558199e2aaac /drivers/media/platform | |
parent | 4a15275b6a18597079f18241c87511406575179a (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>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/platform')
-rw-r--r-- | drivers/media/platform/imx-jpeg/mxc-jpeg.c | 1 |
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); |