From: Shuah Khan Date: Tue, 28 Jun 2016 19:17:17 +0000 (-0300) Subject: [media] s5p-mfc: fix memory leak in s5p_mfc_remove() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6610ef08272b25c5fcf682800fb89d0cca13e883;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git [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 Reviewed-by: Javier Martinez Canillas Signed-off-by: Kamil Debski Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c index 274b4f1fd8ca..f537b7408481 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]);