summaryrefslogtreecommitdiff
path: root/drivers/media/platform/s5p-mfc
diff options
context:
space:
mode:
authorShuah Khan <shuahkh@osg.samsung.com>2016-06-28 19:17:17 (GMT)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2016-07-08 17:26:16 (GMT)
commit6610ef08272b25c5fcf682800fb89d0cca13e883 (patch)
treeb4173c0355256fbf587dec25baaccd195ba6f6f1 /drivers/media/platform/s5p-mfc
parent7d48ea9f54368fa3c740740fb21da8e162a6f631 (diff)
downloadlinux-6610ef08272b25c5fcf682800fb89d0cca13e883.tar.xz
[media] s5p-mfc: fix memory leak in s5p_mfc_remove()
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>
Diffstat (limited to 'drivers/media/platform/s5p-mfc')
-rw-r--r--drivers/media/platform/s5p-mfc/s5p_mfc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c
index 274b4f1..f537b74 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c
@@ -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]);