From patchwork Fri Jul 15 09:33:06 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Chen X-Patchwork-Id: 9231857 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 F286560865 for ; Fri, 15 Jul 2016 12:15:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E2C3827BFC for ; Fri, 15 Jul 2016 12:15:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D720527FA9; Fri, 15 Jul 2016 12:15:16 +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 473F327BFC for ; Fri, 15 Jul 2016 12:15:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933007AbcGOMOz (ORCPT ); Fri, 15 Jul 2016 08:14:55 -0400 Received: from mail-bn3nam01on0052.outbound.protection.outlook.com ([104.47.33.52]:11824 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932785AbcGOMOs (ORCPT ); Fri, 15 Jul 2016 08:14:48 -0400 X-Greylist: delayed 8341 seconds by postgrey-1.27 at vger.kernel.org; Fri, 15 Jul 2016 08:14:48 EDT Received: from DM2PR03CA0005.namprd03.prod.outlook.com (10.141.96.15) by BN3PR03MB2404.namprd03.prod.outlook.com (10.166.75.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.528.16; Fri, 15 Jul 2016 09:40:53 +0000 Received: from BL2FFO11FD046.protection.gbl (2a01:111:f400:7c09::145) by DM2PR03CA0005.outlook.office365.com (2a01:111:e400:2428::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.534.14 via Frontend Transport; Fri, 15 Jul 2016 09:40:53 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; vger.kernel.org; dkim=none (message not signed) header.d=none; vger.kernel.org; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BL2FFO11FD046.mail.protection.outlook.com (10.173.161.208) with Microsoft SMTP Server (TLS) id 15.1.523.9 via Frontend Transport; Fri, 15 Jul 2016 09:40:52 +0000 Received: from shlinux2.ap.freescale.net (shlinux2.ap.freescale.net [10.192.224.44]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id u6F9en2g030029; Fri, 15 Jul 2016 02:40:50 -0700 From: Peter Chen To: , CC: Peter Chen , Subject: [PATCH 1/1] media: platform: ti-vpe: call of_node_put on non-null pointer Date: Fri, 15 Jul 2016 17:33:06 +0800 Message-ID: <1468575186-24961-1-git-send-email-peter.chen@nxp.com> X-Mailer: git-send-email 1.9.1 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131130492528580214; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(2980300002)(1110001)(1109001)(339900001)(189002)(199003)(87936001)(36756003)(4326007)(86362001)(5003940100001)(8666005)(104016004)(19580395003)(50226002)(19580405001)(92566002)(11100500001)(356003)(6806005)(47776003)(77096005)(8676002)(81156014)(586003)(8936002)(2906002)(85426001)(5001770100001)(305945005)(189998001)(106466001)(50466002)(48376002)(33646002)(229853001)(105606002)(68736007)(81166006)(7846002)(97736004)(50986999)(7059030); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR03MB2404; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD046; 1:/47JXs7HWW98dgOyTIOevo1f+el7ltmfL9JA8lyfI8L6hu3lDOGUIlcSXaJgpetgpnjul7T2948ted4KDQndCwVQQQbajRIj4bLANjl2eT/6tjQY/jXOCozkLcBTqYmXw9JZ9WYaCWjp1ovURdFiAC77gVAevDbS+IDbLWWXQJnG96KWfOkKmj8EUv6AlnuA8Q4k8aRxNtMWfzA7jdZBEYursb8wLTr4nFhz0JYJlof4WQhsIqIBO56JKzPUD0tu7+ztWv6E2U4Ra79UQ8pkEzNBErn4YYEmMninRjSfL/ENGQqOL49cM2cOG/fcIJ4geAVeeK+CwNZ1lFC9tp5orv3Lx/4kSHqEpfvGJRKu+7byD+EKEJuLC0FkGPFtROSLNoMF36k80Sq0pp1+JfhLCSbabiKJYxyIwwxvo4BOaS10OH6Z+SzCGm+JQf9fbQ2tK1L09KU+5+8ns3byYABOMkDcYttY6BU1cHXEhpyVmSvWz2F4f9pTVfk0hnkIo+OdkStv5WEsGRAtzY76uS4hd8gZjh2xkx6Qkht0eNQu7z7JA4E3yYBTK5C7Ykjqr9VLKVC9JZRDqvu8ZjzSbWXGRqTX1i7YIXYM/pn4G6j5epSIKfl6FNto1KTRMj5xMk8B MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 1bbd8a81-03ee-42c2-5676-08d3ac941cda X-Microsoft-Exchange-Diagnostics: 1; BN3PR03MB2404; 2:nqR27RdxGrDudxqdyxxO7r1OXAYUrcwCUPK+tuS6h1yF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TwyQDrw1GZP19msYSC4e74wFORiSQPP7j8MNRXpVQrjTimapWFmPiU8RVPNg4cmF5Y9S4BbIKvD7h4EqYB+21m+78j6mRVjMtDjuie4TaYidiXyIy544Vq4MvBB78RjCh9mhVDje4u0Wu5JApUIhTjsnxqkAQI=; 31:6C0ndL0d0z6miBJJ0FmeOJFn0dt8jU/S6roK4W1hn7cEUjD2lz4QB5GQzB8zLNgohAlk54AmqqsOSeKG+U6oCcHdg/f4S7ieJQ4PdBFQ1CyBUioscEPQewgKBXRh6yXETUb2NftUjV8RgtTmqNQDqB9FrVf3ICOBZD0pxT6nmdgvz638YmBSIKB+9 tIQlzigA4YpCIdEODXqzOlsUdgTMg== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(31051911155226)(9452136761055)(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(13015025)(13018025)(8121501046)(5005006)(13023025)(13017025)(13024025)(3002001)(10201501046)(6055026); SRVR:BN3PR03MB2404; BCL:0; PCL:0; RULEID:(400006); SRVR:BN3PR03MB2404; X-Microsoft-Exchange-Diagnostics: 1; BN3PR03MB2404; 4:mB+XGcmlfHsnBfwTnCiN6naygbyUc+roh1jE2nLaU+B87ajs1e8uA0a78rLrNXkJ2MYpzSvR2ZCH3zykRMHIVROAt5plz25WBeuHchCjf4gWNG8/MxGk5dhz4qG1miz5u3Ot3Ccjah4OlKJNP9ifY4BLEVQQ+0/OKslIjtm9lt58R73HW+gjio26jOUNeltXVT3ly2JmCvVK9IO3QrJffP+G3ELvJknMBoH7bN8GTSZfojE+VgMWX0DFKh/yNsYi3Ums8936zf7YQ0EgwxOh3Res34h3FfgBKkywrvhunkhE0pjAhSoUzoOwC8X7RvXGvaLPQRiIPKpEUtFeP9p9mnQP/JQ9YCCGxo///w+b/QabqbQBZSPqKtVP9tYs31LY3qGci+WKGpMAvu5cuJ26wc4HUc/VtUO9KMLoJB4atXgeFaY5JwiAISy0+4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ecyXVjdTBgfMHNVdH1nSyg0+xjuy5N9SUCBLdtMVp+nW1mdUjfUKGraPsMufgY69Lh1Kuc8j5qZ5SRIYgZLE=; 7:hVWUolErxu9/BxA37M09xEZM32IBzQXAQVJAsilcnOo6DRBfUaqcoVFPoEfsNkEIbapnKLHV+W4ru2EYAKFqyHIwkfBbYqqAOq/LdjaTfuR2rqj5eZu4HgHhab4V678gm9HihefQ2ddeHZu7hXpUGB5zoSxEY9W9DAPfjK0OH6/PU8b496A+zQrqlFABQLcyLEbRHBCke64gyWxgEAPV7l156CP1eHimBo6+tVKUXyf9w6TJCVGOCjxGFDxqlHSk SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Jul 2016 09:40:52.6864 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR03MB2404 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 It should call of_node_put on non-null poiner. Cc: linux-media@vger.kernel.org Cc: Mauro Carvalho Chehab Cc: Benoit Parrot Signed-off-by: Peter Chen Acked-by: Benoit Parrot --- drivers/media/platform/ti-vpe/cal.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/media/platform/ti-vpe/cal.c b/drivers/media/platform/ti-vpe/cal.c index 82001e6..00c3e97 100644 --- a/drivers/media/platform/ti-vpe/cal.c +++ b/drivers/media/platform/ti-vpe/cal.c @@ -1761,13 +1761,13 @@ static int of_cal_create_instance(struct cal_ctx *ctx, int inst) } cleanup_exit: - if (!remote_ep) + if (remote_ep) of_node_put(remote_ep); - if (!sensor_node) + if (sensor_node) of_node_put(sensor_node); - if (!ep_node) + if (ep_node) of_node_put(ep_node); - if (!port) + if (port) of_node_put(port); return ret;