From patchwork Fri Nov 25 04:41:47 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: 9446491 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 7E9F560778 for ; Fri, 25 Nov 2016 04:55:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6CB0127D13 for ; Fri, 25 Nov 2016 04:55:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5F10927FA5; Fri, 25 Nov 2016 04:55:58 +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 6C3D627D13 for ; Fri, 25 Nov 2016 04:55:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752668AbcKYEzV (ORCPT ); Thu, 24 Nov 2016 23:55:21 -0500 Received: from mailout1.samsung.com ([203.254.224.24]:54247 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752625AbcKYEzU (ORCPT ); Thu, 24 Nov 2016 23:55:20 -0500 Received: from epcpsbgm1new.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OH6016BXL4208E0@mailout1.samsung.com>; Fri, 25 Nov 2016 13:44:07 +0900 (KST) X-AuditID: cbfee61a-f79916d0000062de-20-5837c1975dec Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1new.samsung.com (EPCPMTA) with SMTP id 01.49.25310.791C7385; Fri, 25 Nov 2016 13:44:07 +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 <0OH600JU3L583C90@mmp1.samsung.com>; Fri, 25 Nov 2016 13:44:07 +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] Media: Platform: Exynos-gsc: - Fix for error handling Date: Fri, 25 Nov 2016 10:11:47 +0530 Message-id: <1480048907-19870-1-git-send-email-shailendra.v@samsung.com> X-Mailer: git-send-email 1.7.9.5 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrJLMWRmVeSWpSXmKPExsVy+t9jAd3pB80jDHZ9krR483YNk8X246/Y LZY9OM1o0f/4NbPF+fMb2C02Pb7GanF51xw2i54NW1ktZpzfx2SxbNMfJotb82ayWSz69orZ 4u/FS2wOvB47Z91l99i0qpPNY++WLI/NS+o9tvQDRfq2rGL0+LxJLoA9ys0mIzUxJbVIITUv OT8lMy/dVik0xE3XQkkhLzE31VYpQtc3JEhJoSwxpxTIMzJAAw7OAe7BSvp2CW4Ze1bOYSn4 zlpxc8o1xgbGVtYuRg4OCQETiTdLmboYOYFMMYkL99azdTFycQgJLGWU2PRwEguE85NR4tat v8wgVWwChhKv+/4ygSREBJ4xSzzd3ccOkmAWkJHYN7ENbJSwgJvEv/a/jCAbWARUJWbvVgAJ 8wp4SPxatxtqsYLEnEk2Exi5FzAyrGKUSC1ILihOSs81zEst1ytOzC0uzUvXS87P3cQIDvZn UjsYD+5yP8QowMGoxMM7Id08Qog1say4MvcQowQHs5IIb8B+oBBvSmJlVWpRfnxRaU5q8SFG U6D1E5mlRJPzgZGYVxJvaGJuYm5sYGFuaWlipCTO2zj7WbiQQHpiSWp2ampBahFMHxMHp1QD o5DID0vjr3y/Lh1OmnREftIfqdOeK1P+f4nOFenWjTx+RvUElyeHEW+8hmu0+dl7wnv5OK7L mom0fluid/WiGltCSiozT+L3GTH75qrnMV59k27TV6hxKyztIG/9HPOQZxNsjOLeOZbeNX2R /vrnshl/d097XOAn2GL78Isf54RbCm0fPXpMlViKMxINtZiLihMBgEA0HYwCAAA= 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: