[media] s5p-mfc: fix memory leak in s5p_mfc_remove()
authorShuah Khan <shuahkh@osg.samsung.com>
Tue, 28 Jun 2016 19:17:17 +0000 (16:17 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Fri, 8 Jul 2016 17:26:16 +0000 (14:26 -0300)
s5p_mfc_remove() fails to release encoder and decoder video devices.

Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/platform/s5p-mfc/s5p_mfc.c

index 274b4f1..f537b74 100644 (file)
@@ -1318,6 +1318,8 @@ static int s5p_mfc_remove(struct platform_device *pdev)
 
        video_unregister_device(dev->vfd_enc);
        video_unregister_device(dev->vfd_dec);
+       video_device_release(dev->vfd_enc);
+       video_device_release(dev->vfd_dec);
        v4l2_device_unregister(&dev->v4l2_dev);
        s5p_mfc_release_firmware(dev);
        vb2_dma_contig_cleanup_ctx(dev->alloc_ctx[0]);