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: 9203903 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 502036074E for ; Tue, 28 Jun 2016 19:23:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3E67328616 for ; Tue, 28 Jun 2016 19:23:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 32A9B2861A; Tue, 28 Jun 2016 19:23:23 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8C12F28616 for ; Tue, 28 Jun 2016 19:23:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752357AbcF1TWy (ORCPT ); Tue, 28 Jun 2016 15:22:54 -0400 Received: from resqmta-po-01v.sys.comcast.net ([96.114.154.160]:33851 "EHLO resqmta-po-01v.sys.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752202AbcF1TWx (ORCPT ); Tue, 28 Jun 2016 15:22:53 -0400 Received: from resomta-po-08v.sys.comcast.net ([96.114.154.232]) by resqmta-po-01v.sys.comcast.net with SMTP id HyanbGyackzylHyasb7kyP; 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=BviCBuaawBLwImovb/N9zhk7QxozbzbUdL3Hd3vZSyiIj3+Kjnr4qSbD9jIiNEOJG bJ/TeKeVM/VK4TskVgOp9yFlIfO1ZAyrhLDIpaQCypSSRQjslDasgUz5Al9+sh/cEH 7sXpbToewj4/F5v4ef4RUH1Y/udiVM4Z9xG/L81GZYmEKrz50nvgrhy9lSQ26jQ/Ti 5LvKS/sJF5pdbC6VREiEAxfgIvTSOq9Xz52sxlvglFdzEeZ39rfsePcIKy/p7Uowd7 9CFjmPn/WRWccoJfVf5FKuvELX07MB1CV+LN2dKqMgQUFRSok0rua0BNvFiGPplWzr vFiaZu1+qqrtQ== 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 Cc: Shuah Khan , linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org 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: Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.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]);