From patchwork Tue Jun 28 19:17:17 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shuah Khan X-Patchwork-Id: 9203907 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E1A7D60757 for ; Tue, 28 Jun 2016 19:25:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CF78128616 for ; Tue, 28 Jun 2016 19:25:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C2FDF2861A; Tue, 28 Jun 2016 19:25:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5C68028616 for ; Tue, 28 Jun 2016 19:25:05 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bHybH-0006Gx-Nz; Tue, 28 Jun 2016 19:23:11 +0000 Received: from resqmta-po-04v.sys.comcast.net ([2001:558:fe16:19:96:114:154:163]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bHybE-0006Cv-7A for linux-arm-kernel@lists.infradead.org; Tue, 28 Jun 2016 19:23:09 +0000 Received: from resomta-po-08v.sys.comcast.net ([96.114.154.232]) by resqmta-po-04v.sys.comcast.net with SMTP id Hyanb6VvJwN2qHyasbea1X; Tue, 28 Jun 2016 19:22:46 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20140121; t=1467141766; bh=Ov875UkGUyYflXeXQvlULRdqjnOnjm/NfmaKxqsY/BE=; h=Received:Received:Received:From:To:Subject:Date:Message-Id; b=sb+Ut5vZPYLSO12+PJnonbUkm0cUQu/KKR6EOdH9PL0K3mqn8IMXqd2myT9WOEnq7 HWl9NiBn5uRH+HBQzMJC/JLAVvW3S4Da/b8hr6t/1TJvNaYWMBg7cnFWbE1aCzD4kx TDXziUl1NjVlTk3DnjkcspGjxy9l1Ntqr+8ILsa1lP75VE3op0BinHHUOKFe904gBG FNqgz6Pf6nyOJwQxpCYF27ov9Ip02cfqAYFzBWlie+5+sWqd1hMmZLwZNmkKf3pwxd 10JLjauEhqztG+k1ECVINZU36PN9Fb6g73PYJs7+x/REJqRCfpQ757MwcRduYGehaR 5GDDfGngd7IRg== Received: from mail.gonehiking.org ([73.181.52.62]) by resomta-po-08v.sys.comcast.net with comcast id CKNm1t00B1LXgTt01KNmeP; Tue, 28 Jun 2016 19:22:46 +0000 Received: from shuah-XPS-13-9350.sisa.samsung.com (shuah-xps.internal [192.168.1.87]) by mail.gonehiking.org (Postfix) with ESMTP id 74F059F2F6; Tue, 28 Jun 2016 13:17:21 -0600 (MDT) From: Shuah Khan To: kyungmin.park@samsung.com, k.debski@samsung.com, jtp.park@samsung.com, mchehab@osg.samsung.com Subject: [PATCH REBASE 2/3] media: s5p-mfc fix memory leak in s5p_mfc_remove() Date: Tue, 28 Jun 2016 13:17:17 -0600 Message-Id: <08a995ba777f7ee9f38d6ee886bbe1f2a9656781.1467140929.git.shuahkh@osg.samsung.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160628_122308_354961_CE3A4779 X-CRM114-Status: UNSURE ( 6.25 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, Shuah Khan , linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP s5p_mfc_remove() fails to release encoder and decoder video devices. Signed-off-by: Shuah Khan Reviewed-by: Javier Martinez Canillas --- 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]);