From patchwork Mon Jul 4 02:47:46 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Chen X-Patchwork-Id: 9211557 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 CD69760572 for ; Mon, 4 Jul 2016 02:56:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BF46428610 for ; Mon, 4 Jul 2016 02:56:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B3B2828625; Mon, 4 Jul 2016 02:56:53 +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.2 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, RCVD_IN_DNSWL_MED 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 322AA28610 for ; Mon, 4 Jul 2016 02:56:52 +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 1bJu2e-0004Jt-A1; Mon, 04 Jul 2016 02:55:24 +0000 Received: from mail-co1nam03on0048.outbound.protection.outlook.com ([104.47.40.48] helo=NAM03-CO1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bJu2b-00038X-QJ for linux-arm-kernel@lists.infradead.org; Mon, 04 Jul 2016 02:55:22 +0000 Received: from BY2PR03CA057.namprd03.prod.outlook.com (10.141.249.30) by BLUPR03MB582.namprd03.prod.outlook.com (10.141.79.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.528.16; Mon, 4 Jul 2016 02:54:59 +0000 Received: from BL2FFO11FD024.protection.gbl (2a01:111:f400:7c09::148) by BY2PR03CA057.outlook.office365.com (2a01:111:e400:2c5d::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.523.12 via Frontend Transport; Mon, 4 Jul 2016 02:54:58 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; samsung.com; dkim=none (message not signed) header.d=none; samsung.com; 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 BL2FFO11FD024.mail.protection.outlook.com (10.173.161.103) with Microsoft SMTP Server (TLS) id 15.1.534.7 via Frontend Transport; Mon, 4 Jul 2016 02:54:57 +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 u642sqlB001392; Sun, 3 Jul 2016 19:54:54 -0700 From: Peter Chen To: , Subject: [PATCH v2 1/1] devfreq: exynos-bus: add missing of_node_put after calling of_parse_phandle Date: Mon, 4 Jul 2016 10:47:46 +0800 Message-ID: <1467600466-13667-1-git-send-email-peter.chen@nxp.com> X-Mailer: git-send-email 1.9.1 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131120744978469721; (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)(8666005)(356003)(229853001)(68736007)(8676002)(92566002)(2906002)(85426001)(81156014)(4326007)(81166006)(106466001)(105606002)(586003)(5001770100001)(19580405001)(19580395003)(97736004)(47776003)(6806005)(86362001)(305945005)(87936001)(189998001)(50466002)(7846002)(50986999)(33646002)(48376002)(575784001)(104016004)(77096005)(5003940100001)(8936002)(50226002)(36756003)(7059030); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR03MB582; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD024; 1:hXN13HBaRDnRo7u3WB6xYQ5S77ji65bcu6b5MsDvx0vcon/r485/BQyHpani1kwGx+oT65cdBtDrpuABFIIGMiwCs90o+T4nB2WxPDFajCCHQD59BcwSCLhTeJqXB4wigioGOq4/QSvhJavPgy0PiOCWufyEgsbfjEP4davdT6cVUJ2qW8gUuGKyNsKEdN2KLm9WoxImhVFJGO7wh358xnkeBOSva+67E7bYlA4awZ/XkYdKRhDkBe2KaYtD8LZfrDUN3v+qWOlIqYYOYYOr12TH0eiwTa2SQHl46EmuSivSiTLdnwJxHaC4Mxk399XL8DI983SLGY8BJ/hMGHXNabt4NkvE6/xYumu+S+3vJet/l4ZfcmMdf693khpqT9BAhqp/IoaZeNSPbd879mbmL5Bam/l/DgZV2qVU79/gl3Fcqk66RnyIKjpQL7zNrNBDc5KAglih94OUXFE59LVR4sw9AUbC6GCSM1OEToZTtUrIIxLIs+NOQtFYRXAncbyIAXgSsOwFpGy9irW1sYAmeqYmvjdo2qnubokUav1L8jynh1pfZxJUp178hQxBnAEgEgRh1ncy1M4rfOxDX6TPKw== MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: f192082f-e533-46cc-f1f8-08d3a3b69594 X-Microsoft-Exchange-Diagnostics: 1; BLUPR03MB582; 2:iO0oo5UuzH+54lB7umotaj0XQFN2Vt+8394KY+vK1ddeOZIxZj722TN8jzbYOw8JwcBP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pNJXvz4IcizyGyM7KSSy5Co+4UpT0ekRxt/Lm8YatrYNmEErqaMt7HhIHkUdH3KhguBKt7A+eLjpSrdB222cpNtZsXcq+fFdz2jaxMUQ==; 31:fC83lfq8wZmOj2vngfYkcwYfnCPUoDsQ8dfmLK510hN+jx0nC/iKHRfq0rnJKWGo1RBTyEUzfimP/viTYH/itbvxjg0cp3eh9M8Cnku+8Yz0TyuwGc32U8h+CHSSac9wLY7VbBuHnAGWm4bAlQpDGqwwBdVOmeU92e2xZ85GxVuzm8XFPgv6aXgsFuJf9zOQBQrCYFclDEt3Z5orelIBYQ== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(20558992708506)(185117386973197)(7411616537696); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(13015025)(13018025)(5005006)(8121501046)(13024025)(13023025)(13017025)(3002001)(10201501046)(6055026); SRVR:BLUPR03MB582; BCL:0; PCL:0; RULEID:(400006); SRVR:BLUPR03MB582; X-Microsoft-Exchange-Diagnostics: 1; BLUPR03MB582; 4:b77CgfIRMTdhAUSPDEdjaskTLmcI0nSCaalc6TsFG7duVeiGt6w9f5iFGtQ8diE+aNvmuQGrw3Vs4li85ulPmY2kQHJLGlNx4GCjrqdWNyB1k31QoeOqm6VXDUBe4WD0exkQwxYQl/DsbNu7dnLGizg1Tlblxb1/vcQTi/Bsbo+WGBNp4PKSWRvasyGW4/cAzQXorpsqGB3fVsA3Co5DPtSEtxOMimVOB6KaxgZqh6Lyv9FlzqFTYZA+busvoOXykVobHQmJ/gXb2Qxk6KLzslnblViwS+mkPJHBp5rngLWwqq5OJ/LNjMGniTOoDwcsS1Z/R6feobiIxrRaFcnV1do1D66HCX8ogRWkWNUEShzF8stCWLKYuiqvI7xnYJbmRpkzPDYjM6G9GtkCi99eOe+F22U/uNVGzK+LFBlFEgRHRH9io9zJ//uxc4FbbuK+rZCaiIMR4DWDqc3mtk+uqG9JuYPLaH/MFJJbfZDNYzYbGGHHl2kcEkj6IPe+o3d5MAxYldmdkIaXBsaLAumJktwPl4YdUwXETypN1fQbvMsj9tb/+EdNPYevncVbigJhZC9Wum/2k3hWQX8MhD5pjQ== X-Forefront-PRVS: 0993689CD1 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR03MB582; 23:dujOSxHbMnr6X8Byko0heQl+a45C965iT5MuYtjHwD?= =?us-ascii?Q?5/s4qsf7RUFLh2e9cgsjuNtlVJk2cJ+cGdXWkHtFBHMjyOiJSIaqghh4yYDj?= =?us-ascii?Q?MH9xcRGbM9rzUonlgImVbsYDFWUa+RPYMXDT5z21odCOBmJ+Z09qNmbjryuQ?= =?us-ascii?Q?runpN7VeThIU8e6oCNg9JGVNGvT9LMk4OGn/WPjNfmz5EmVBY/gTNS7cwRvq?= =?us-ascii?Q?G2KwZkuNJbDvcMwPjLq4CYCseTp2WvMMMsu517Ltt4qJG/t8VY4L0bKCVv4+?= =?us-ascii?Q?Y6wuhNTD457Jp+ZE7qMZzBF4aJckG6HwkNP6MkIvWIVUlICoroso7GyDMml7?= =?us-ascii?Q?7UZZPTFqRJzUYi9pVI7/ri6R0IME9XyT5VPq6JXVbh1zkVeq3WfYinf146s0?= =?us-ascii?Q?eP1o1X3PGuKneWszOgav9m1mRdu/zsVO5Yqooqh23iTWSlDWrTW21apwV2aP?= =?us-ascii?Q?SGGMkb9Kjsbt4/T96bk0fULUNMIScxl9QECrNl3ZOMY1skX6XDzk7PITizXG?= =?us-ascii?Q?Ty4YvCM+L3VAE54jwB7/AaBZ9uSaXDaI2G2A/GUTDh0YWHt54zdkhOW5Spd8?= =?us-ascii?Q?38oYHRKf5o9eD1EMcwaBCaKU/St6tIscOChM4Q803tJRJ71gyzRD1oyxpSey?= =?us-ascii?Q?Gv6eAFWqF6+2LUB+h9VuGzouuE77eFFSqnNsb2rtokkgNUP6LFi7bFx3cK0M?= =?us-ascii?Q?ekoZchpHtOp4nS2TCiIpeh0S7VcHOnpexSdtSx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 7:yDKMlWrK06uXt2N63VXsChYH0Fbr3v2MA3vc66IdRLjQcGAvMcl8gg+zgYu8uLTe5woCTafeT1DlN8kMOq8Xa20sxBxyQnew6QLtgJFmqTbkWOmKnRIospOkgnLZX9peLeCHDSKKzTc3F50v7wykea/Q9lRfe/8+yd3G2U3woy1SE2GpL/z3V24Gi3tMzOcV2cMu4Hz85pJMM8n8KOT+U5pcHkC9XrcXYMw8TNa2pZPHBQ7gTNAPLcIlG7tDgSE3 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jul 2016 02:54:57.6597 (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: BLUPR03MB582 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160703_195521_974117_335F7B38 X-CRM114-Status: GOOD ( 14.90 ) 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: Peter Chen , Krzysztof Kozlowski , linux-samsung-soc@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Chanwoo Choi , Kukjin Kim , linux-arm-kernel@lists.infradead.org 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 of_node_put needs to be called when the device node which is got from of_parse_phandle has finished using. Cc: Chanwoo Choi Cc: MyungJoo Ham Cc: Kyungmin Park Cc: Kukjin Kim Cc: Krzysztof Kozlowski Signed-off-by: Peter Chen Acked-by: Chanwoo Choi --- Changes at v2: - It should define node as pointer, kbuild test robot reports it drivers/devfreq/exynos-bus.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/devfreq/exynos-bus.c b/drivers/devfreq/exynos-bus.c index 2363d0a..4b4c63c 100644 --- a/drivers/devfreq/exynos-bus.c +++ b/drivers/devfreq/exynos-bus.c @@ -383,7 +383,7 @@ err_clk: static int exynos_bus_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; - struct device_node *np = dev->of_node; + struct device_node *node, *np = dev->of_node; struct devfreq_dev_profile *profile; struct devfreq_simple_ondemand_data *ondemand_data; struct devfreq_passive_data *passive_data; @@ -415,10 +415,13 @@ static int exynos_bus_probe(struct platform_device *pdev) goto err; } - if (of_parse_phandle(dev->of_node, "devfreq", 0)) + node = of_parse_phandle(dev->of_node, "devfreq", 0); + if (node) { + of_node_put(node); goto passive; - else + } else { ret = exynos_bus_parent_parse_of(np, bus); + } if (ret < 0) goto err;