linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] media: s5p-mfc fix memory leak in s5p_mfc_remove()
@ 2016-06-13 19:45 Shuah Khan
  2016-06-28  9:57 ` Kamil Debski
  0 siblings, 1 reply; 8+ messages in thread
From: Shuah Khan @ 2016-06-13 19:45 UTC (permalink / raw)
  To: linux-arm-kernel

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>
---

Changes since v1:
- Addressed comments from Javier Martinez Canillas and added
  his reviewed by:

 drivers/media/platform/s5p-mfc/s5p_mfc.c | 2 ++
 1 file changed, 2 insertions(+)

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]);
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread
* [PATCH] media: s5p-mfc fix memory leak in s5p_mfc_remove()
@ 2016-06-09  1:35 Shuah Khan
  2016-06-13 13:42 ` Javier Martinez Canillas
  0 siblings, 1 reply; 8+ messages in thread
From: Shuah Khan @ 2016-06-09  1:35 UTC (permalink / raw)
  To: linux-arm-kernel

s5p_mfc_remove() fails to release encoder and decoder video devices.

Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
---
 drivers/media/platform/s5p-mfc/s5p_mfc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c
index 274b4f1..af61f54 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c
@@ -1317,7 +1317,9 @@ static int s5p_mfc_remove(struct platform_device *pdev)
 	destroy_workqueue(dev->watchdog_workqueue);
 
 	video_unregister_device(dev->vfd_enc);
+	video_device_release(dev->vfd_enc);
 	video_unregister_device(dev->vfd_dec);
+	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]);
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-06-28 19:27 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-13 19:45 [PATCH] media: s5p-mfc fix memory leak in s5p_mfc_remove() Shuah Khan
2016-06-28  9:57 ` Kamil Debski
2016-06-28 13:39   ` Shuah Khan
2016-06-28 15:55     ` Shuah Khan
2016-06-28 19:27       ` Shuah Khan
  -- strict thread matches above, loose matches on Subject: below --
2016-06-09  1:35 Shuah Khan
2016-06-13 13:42 ` Javier Martinez Canillas
2016-06-13 15:38   ` Shuah Khan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).