From patchwork Fri Jul 1 09:42:01 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Chen X-Patchwork-Id: 9209629 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 C9482607D8 for ; Fri, 1 Jul 2016 09:51:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B879928529 for ; Fri, 1 Jul 2016 09:51:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ABA022867A; Fri, 1 Jul 2016 09:51:39 +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 1302328529 for ; Fri, 1 Jul 2016 09:51:39 +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 1bIv5Z-00040w-R2; Fri, 01 Jul 2016 09:50:21 +0000 Received: from mail-bn3nam01on0081.outbound.protection.outlook.com ([104.47.33.81] helo=NAM01-BN3-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bIv4y-0002BX-Q3 for linux-arm-kernel@lists.infradead.org; Fri, 01 Jul 2016 09:49:46 +0000 Received: from BY2PR03CA041.namprd03.prod.outlook.com (10.141.249.14) by BY1PR0301MB0854.namprd03.prod.outlook.com (10.160.193.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.528.16; Fri, 1 Jul 2016 09:49:22 +0000 Received: from BY2FFO11FD015.protection.gbl (2a01:111:f400:7c0c::124) by BY2PR03CA041.outlook.office365.com (2a01:111:e400:2c5d::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.528.16 via Frontend Transport; Fri, 1 Jul 2016 09:49:22 +0000 Authentication-Results: spf=fail (sender IP is 192.88.158.2) 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.158.2 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.158.2; helo=az84smr01.freescale.net; Received: from az84smr01.freescale.net (192.88.158.2) by BY2FFO11FD015.mail.protection.outlook.com (10.1.14.131) with Microsoft SMTP Server (TLS) id 15.1.534.7 via Frontend Transport; Fri, 1 Jul 2016 09:49:21 +0000 Received: from shlinux2.ap.freescale.net (shlinux2.ap.freescale.net [10.192.224.44]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id u619mwoW013455; Fri, 1 Jul 2016 02:49:18 -0700 From: Peter Chen To: , , , , Subject: [PATCH 7/7] devfreq: exynos-bus: add missing of_node_put after calling of_parse_phandle Date: Fri, 1 Jul 2016 17:42:01 +0800 Message-ID: <1467366121-14120-8-git-send-email-peter.chen@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1467366121-14120-1-git-send-email-peter.chen@nxp.com> References: <1467366121-14120-1-git-send-email-peter.chen@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131118401621469882; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.158.2; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(979002)(6009001)(7916002)(2980300002)(1109001)(1110001)(339900001)(199003)(189002)(105606002)(87936001)(8666005)(575784001)(86362001)(97736004)(5001770100001)(2201001)(81166006)(81156014)(8676002)(305945005)(68736007)(229853001)(2906002)(36756003)(4326007)(586003)(106466001)(2950100001)(50986999)(104016004)(19580395003)(76176999)(69596002)(11100500001)(19580405001)(92566002)(33646002)(48376002)(189998001)(7846002)(50466002)(5003940100001)(47776003)(77096005)(85426001)(6806005)(356003)(50226002)(8936002)(7059030)(2101003)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:BY1PR0301MB0854; H:az84smr01.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD015; 1:L+yjJm8S8gHL1+BWs54Vo9Ab8BJZ57FUUm2Hvo01JIiw1LbFu6PcTmD1gQTfNbjq+DBWUgLaFM41brj/GVNcMyKmYSRw85sbi+uZDKmejLaeupvIlcfB3ONjB3wCkAk7Zz7ak1UmU0e7+5nXfagLRNBXgNkxDsU7q2eVwqof4NDEVI8RNKY/KG/g+wOupL0ILCTbKWnXEPbMgb7CEXt7DI++0NfUXsybDYlet1/5dqa9heWVQjerHbFiX5bYyKqI0Tj7gAUIMQaOvUKxLaqZ4SoU172Gd6EW8gFa5R30E+yFNCLhLyYFrRu+X+XgNSLrlO4YFIMTYm/a8pCrkAs5RQCzilGNq7dzgHTukl0h60zN7E2+AV+ACsZv3pRXMWPZUgmzT0Bl2wrOrbKfesY1ddvf1a5J8Cz8cX37EapNgtZLWaibqFWzcGB4HaOKlUb1kHN8+MmS76W7mmt1tKsqtfot9AnJgae4r1CF91X5T9ScdX9Vs/elTE9659m2ruw1tzvsGqtE4Ej4k4v3F276lCwoaKbn4PizyM2/PW//Jgg8S9X3mvIiUlKNYlKm+MyBSXVPnTs/fL6MFiW1iq5uKLAjFsQNT85Wpf/vPAKtBuO4Ql0TwZORqUM2coc2wsP2 MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 5b40407f-8007-4882-c959-08d3a194fa9e X-Microsoft-Exchange-Diagnostics: 1; BY1PR0301MB0854; 2:0S8UfU4bF6odWQAPLw5b9Y7MsdQXfcj+GAMm6eZeMEfYEspLo3sKbYF/gn6bbrRnfk43qHTHwnFVqWmnYBzIGvrMv1uHI0nFXMtjbTJmuMuqoj4fLGqLRPULKzIYmCFkURWNezQVPBZfAWO/vN9A9na7lvALTGHN9hXxzl0TFpMwXpFsSyR99wia+SduvYhq; 3:ODQCIJr/zfmTg3HCLaLe+xgzi30q0HMXansSvtFnVoYPbdiB+q5B1IB9wlnguXvS+W1Pnj68DaWwLVkY5bmsAn9Nv0y3u2uv3smlfkwpOwDl0zGqPAAveSqqfi8IC+iD84aR3fCAN+fo6v9FoTU8RcO7V3mS60tMM8fjHN6NKMjYhMSofDrGw3CpgD+9ip6TzXO5jt5d0m7oz94byhK97J+LnsshsSZTOyNDviWNgy0=; 25:eqQUPwqc8foS/jJAz1WeeOcBfasonhGq2WNQHxqrW7gjsMRnuUKwzcYrpa+CmpCFUaU5BXHwJ4Xw/DzbxmPM8APem9jaGwla+hACgUYc/r2L9jxSlOE8Ya3kLuoMFVIfvtkB80IcNcWCfchsE137cAWSmNGWWC7hXVFu6WL//0SvD3Fwj1RKX1De4R2M5iAbcFfJL0nuO2oAzscAgnizlWSzdYaG/ia4iaEWscEcelyYmf7TMYV4NIt2/CP/FCx5GmB3188dHktehCy2Ct/BQgvggSRI/jOjE+RpYq+T8w/WNYv9fLxp4Z8VrJ2pAhkyWQfuEnxjsff0/GLaLq+fxkIDg5/6bFs3FPr26wb1XHqXLeL5wjYVgnj7pBK9k3p1UfgQJ2ihfMWBZmMf+GmBj08Bp6aGmOXsrScpJo5V/ok= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY1PR0301MB0854; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0301MB0854; 31:7EAjXtktKU/rM06dOmlbE3lPx/YmxxUi/MVB45oECChbBoRP/D32JEkHDUh1TboGXyxCmWivkhHvS1GYZ2sjj6Wwk6lAZdKQTT7J21nbPN487MnaF9O1uit5B6lWOLCB8vgfAbfefktfLXgttJM4E/7x7y+9AC/ROwXwRkKuNGMh5Lq7JXUwBcTA4agZFuRh5g7ICb5ynb6jOo8E6i2YJw==; 4:ljHASShyTbqNb6YaHkegHtVRpxXTlRGXFXiCFd91Z+lVxbP+IoR2OARoWO1VIcdr4Zq0um5lPp1O7NFIIrR0DiNm6W8ML+ZFpXP9KOHXEEUYNPjMY/B42TLWZr5PD/kKCmxpt657xl+hPCxCJedgSGHbYTsnVdY2JjEqmkN+6KqE5qisvV/w8UfPk6FaUDrDQBeTV8MfTTrgKUIyK9i+a2r7tSBKmse9/tJLY1vpWbCsI6wpqcG7lA83k/XlAZXDzcsz0fDfLa91hkuohlP1BmjSYQxCLB7KGoiEYj3wKYx0Pt8KNU9EBms5n4dym9JmjFe7arMYrsCz5odKLJ82nqytB1yL90EFJ5V+yINjIaxAB58DjuOMd+Ay3AFCCzYhxk0sAQhsR/+zuPS31uIV4Y+Aa60NokFqdgwnL9LJQewtXTqL9QJ/BKBUMzNg3mw5Wh0ktE+GZ3uVidgvVItta2Z7Otr0r8YUd2g5NFdRX5v4zfR92KvH8r1e68FZG787tl1wa69huru1x2DzQdvoisi3ixKZlaqDFpSr5/miJHDDmjFAxhmCxKs92I+eOW9s X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(7411616537696); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(13017025)(13015025)(13018025)(13024025)(13023025)(8121501046)(5005006)(3002001)(10201501046)(6055026); SRVR:BY1PR0301MB0854; BCL:0; PCL:0; RULEID:(400006); SRVR:BY1PR0301MB0854; X-Forefront-PRVS: 0990C54589 X-Microsoft-Exchange-Diagnostics: =?us-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y51dSCHrlRVy5ImUq17aI=; 24:s5kQKVn6RLuCrJV3U2sbiZrVx7Y8OXhFqBuxEQsco5oU9Qj5ehlQR9ebswYhZaG+nqFRkGtHYTvc16tTnWVXQxUGVf9/BO7KXAGXOfRgrdA=; 7:yvdCI0Odxqzz1tBbrP3ASVmRagrCFv11AbvgQzfpVoHcTjsK06HlLlz3N8YUCjTBWXDiTEZOT0a6JIyyRw8uRbbzqRcKQipk1VldbV7aIw2ilMWLfM7weiEyJ+GcdSzR9MPm1Qocv33E+UMdWtLp55e8HP1fq1CQMybO+SbsXCbrAmxpHAOu6oKTj7NMvlitTf+4hCn9QYE/yOIfwPq3n2T8JW+2OWyuvOCZaXWQsBshX4rV3TQQk8x5v/PySpeX SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jul 2016 09:49:21.7881 (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.158.2]; Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0301MB0854 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160701_024945_150224_AA96632B X-CRM114-Status: GOOD ( 10.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 , Chanwoo Choi , Kyungmin Park , MyungJoo Ham , Kukjin Kim 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 --- 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..a38b5ec 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 *np = dev->of_node, 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;