From patchwork Thu Dec 1 04:42:44 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: shailendra.v@samsung.com X-Patchwork-Id: 9455355 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 8815760235 for ; Thu, 1 Dec 2016 04:45:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7D8E928497 for ; Thu, 1 Dec 2016 04:45:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 725F3284C8; Thu, 1 Dec 2016 04:45: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.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI 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 12F8728497 for ; Thu, 1 Dec 2016 04:45:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755372AbcLAEpW (ORCPT ); Wed, 30 Nov 2016 23:45:22 -0500 Received: from mailout3.samsung.com ([203.254.224.33]:47309 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750975AbcLAEpV (ORCPT ); Wed, 30 Nov 2016 23:45:21 -0500 Received: from epcpsbgm1new.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OHH01T4CP7IMVC0@mailout3.samsung.com>; Thu, 01 Dec 2016 13:45:19 +0900 (KST) X-AuditID: cbfee61a-f79916d0000062de-09-583faadfb91d Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1new.samsung.com (EPCPMTA) with SMTP id C5.00.25310.FDAAF385; Thu, 1 Dec 2016 13:45:19 +0900 (KST) Received: from localhost.localdomain ([107.108.168.37]) by mmp1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OHH00C19P6UD000@mmp1.samsung.com>; Thu, 01 Dec 2016 13:45:19 +0900 (KST) From: Shailendra Verma To: Mauro Carvalho Chehab , Kukjin Kim , Krzysztof Kozlowski , Javier Martinez Canillas , Junghak Sung , Julia Lawall , linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Shailendra Verma , Shailendra Verma Cc: vidushi.koul@samsung.com Subject: [PATCH] Platform: Exynos-gsc: Clean up file handle in open() error path. Date: Thu, 01 Dec 2016 10:12:44 +0530 Message-id: <1480567364-12963-1-git-send-email-shailendra.v@samsung.com> X-Mailer: git-send-email 1.7.9.5 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrFLMWRmVeSWpSXmKPExsVy+t9jAd37q+wjDD7s5bV483YNk8X246/Y LZY9OM1o0f/4NbPF+fMb2C02Pb7GanF51xw2i54NW1ktZpzfx2SxbNMfJotb82ayWSz69orZ 4u/FS2wOvB47Z91l99i0qpPNY++WLI/NS+o9tvQDRfq2rGL0+LxJLoA9ys0mIzUxJbVIITUv OT8lMy/dVik0xE3XQkkhLzE31VYpQtc3JEhJoSwxpxTIMzJAAw7OAe7BSvp2CW4Ze1bOYSn4 zlpxc8o1xgbGVtYuRk4OCQETiQsX1zNB2GISF+6tZ+ti5OIQEljKKNHc95cVwvnJKPHn3wxm kCo2AUOJ131/mUASIgLPmCWe7u5jB0kwC8hI7JvYBjZKWCBYYvrVg0A2BweLgKrE/C3WIGFe AQ+Jxi1PmEHCEgIKEnMm2Uxg5F7AyLCKUSK1ILmgOCk91zAvtVyvODG3uDQvXS85P3cTIzjc n0ntYDy4y/0QowAHoxIP74I4+wgh1sSy4srcQ4wSHMxKIrznVwKFeFMSK6tSi/Lji0pzUosP MZoCrZ/ILCWanA+MxbySeEMTcxNzYwMLc0tLEyMlcd7G2c/ChQTSE0tSs1NTC1KLYPqYODil GhgnLe5LFTQzstg4++28w3l92s8WKxSGKUwOr8yI8u9ZzaVT/k3O5ZqWiixX7Oq8NXELMq+f Ktqtb2Dy8kvZhytZRfJJC68xnmHhiXQo2Sxz+trCpAtrw6aeniccImrI2T/Z40Xm3iUKR1Oz DNzVJROLOPeU6Wh/D87vct2r/iHz4ZS/KmclTZRYijMSDbWYi4oTAYy4V0SNAgAA X-MTR: 20000000000000000@CPGS Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The File handle is not yet added in the vfd list.So no need to call v4l2_fh_del(&ctx->fh) if it fails to create control. Signed-off-by: Shailendra Verma --- drivers/media/platform/exynos-gsc/gsc-m2m.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/exynos-gsc/gsc-m2m.c b/drivers/media/platform/exynos-gsc/gsc-m2m.c index 9f03b79..5ea97c1 100644 --- a/drivers/media/platform/exynos-gsc/gsc-m2m.c +++ b/drivers/media/platform/exynos-gsc/gsc-m2m.c @@ -664,8 +664,8 @@ static int gsc_m2m_open(struct file *file) error_ctrls: gsc_ctrls_delete(ctx); -error_fh: v4l2_fh_del(&ctx->fh); +error_fh: v4l2_fh_exit(&ctx->fh); kfree(ctx); unlock: