From: Mirela Rabulea <mirela.rabulea@xxxxxxx> 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@xxxxxxx> --- drivers/media/platform/imx-jpeg/mxc-jpeg.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/media/platform/imx-jpeg/mxc-jpeg.c b/drivers/media/platform/imx-jpeg/mxc-jpeg.c index 2d29558f1864..ca1b7e8c65f4 100644 --- a/drivers/media/platform/imx-jpeg/mxc-jpeg.c +++ b/drivers/media/platform/imx-jpeg/mxc-jpeg.c @@ -2099,7 +2099,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); -- 2.17.1