From patchwork Fri Jul 1 09:41:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Chen X-Patchwork-Id: 9209621 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 258F1607D8 for ; Fri, 1 Jul 2016 09:51:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 169DF28529 for ; Fri, 1 Jul 2016 09:51:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0B3282867A; Fri, 1 Jul 2016 09:51:02 +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 8868F28529 for ; Fri, 1 Jul 2016 09:51:01 +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 1bIv51-0002Lr-0W; Fri, 01 Jul 2016 09:49:47 +0000 Received: from mail-by2nam03on0611.outbound.protection.outlook.com ([2a01:111:f400:fe4a::611] helo=NAM03-BY2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bIv4p-00028s-4G for linux-arm-kernel@lists.infradead.org; Fri, 01 Jul 2016 09:49:35 +0000 Received: from DM2PR03CA0046.namprd03.prod.outlook.com (10.141.96.45) by SN2PR03MB1933.namprd03.prod.outlook.com (10.164.114.157) with Microsoft SMTP Server (TLS) id 15.1.447.15; Fri, 1 Jul 2016 09:49:13 +0000 Received: from BY2FFO11FD009.protection.gbl (2a01:111:f400:7c0c::182) by DM2PR03CA0046.outlook.office365.com (2a01:111:e400:2428::45) 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:13 +0000 Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=nxp.com; arm.com; dkim=none (message not signed) header.d=none;arm.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 BY2FFO11FD009.mail.protection.outlook.com (10.1.14.73) with Microsoft SMTP Server (TLS) id 15.1.523.9 via Frontend Transport; Fri, 1 Jul 2016 09:49:12 +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 u619mwoT013455; Fri, 1 Jul 2016 02:49:10 -0700 From: Peter Chen To: , , , , Subject: [PATCH 4/7] bus: arm-cci: add missing of_node_put after calling of_parse_phandle Date: Fri, 1 Jul 2016 17:41:58 +0800 Message-ID: <1467366121-14120-5-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: 131118401529179418; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.158.2; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(2980300002)(1109001)(1110001)(3190300001)(339900001)(189002)(199003)(69596002)(81156014)(81166006)(105606002)(5001770100001)(2906002)(305945005)(50986999)(2950100001)(586003)(76176999)(5003940100001)(48376002)(8676002)(19580395003)(106466001)(50466002)(8936002)(85426001)(92566002)(8666005)(77096005)(87936001)(104016004)(7846002)(47776003)(4326007)(19580405001)(229853001)(2201001)(68736007)(575784001)(6806005)(86362001)(50226002)(36756003)(97736004)(189998001)(11100500001)(356003)(33646002)(7059030)(2101003); DIR:OUT; SFP:1101; SCL:1; SRVR:SN2PR03MB1933; H:az84smr01.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD009; 1:yHppw4Ji+7qiFmumheUDitYsviDiPQj7YNY0XPjMLrC6TKpN/27+hd8hO0SvLv6BgbOVImb7DypUV58o7KNVV8jy+GDGtGhRqzDrITgaq/wZ4T9fde82Dm+8iv4VLfNuNU+hExRqEv8kVunJL63fziQSjYy5oqbk43BMEUzBQLBruTcuBGCBrpPUHxjvlHKJTpcxuNMnAnvfzKC9erAROXrfC7kUIfoHfK4UITZsPmewwM5fofD7tOKzhQnPKULo9ueQO7KU512jSQz/ZDlQ1qrnMdATMdSCXHMzcxzkSuQ7qcZaXjFZMMGDN25acGdaD0WXKjd+3tq3HVf1Uq5iMB72KU8RkmCP5n8WNfL/UVbFN8qQQZYzl7Z3TzJC9aVVmCDmCM/CDlnJUgysfdBI9i2eN3DoOqe4U68vaPOGC6kqtXf1gFzcYhtQiKip/a81MnqvGtvlvHPLOC8Co1Zh5VD9FGP59dpZfdQYH/9OL/U6Ic/L/8EVErvpNaEIa4yD5i5riza0LON6xvJEtlO1vx2yAmML5sK+bp+3lvfHkEefXx6U1UwkNCmI3lWppM0kxCFBDeDO3ofuMf1SlSjCV2NpK9aREByW5di1wEEeQ3qJ06lOcJcNyBNLh9xuG6iuCbnZ++TW8ca+JNqIMtRINDF4srYWJXTFiE9J5+heua8= MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 5d054b74-71a9-4d01-8bb8-08d3a194f51e X-Microsoft-Exchange-Diagnostics: 1; SN2PR03MB1933; 2:VRUAofiLSBLxKPobmDudVafvn1WnWxLH6Cuvlb2ZA20VqvGyqebDGbMwZ16oafMlXssM0+nA3zBY0rQ924UqIuohm8RWmveHWUDFsnjU4yJE5JbX3v6v7LfERfLLQT3tvdF0lMFSkUyTdZC3iwwdYe9QX9Ob3ntMdTPFT0YysrSrD2Mb3wOnHUKOzOhOnpMt; 3:D/4ifulKWYDc8LBb5CpxSP1UmfbEdnm+pFn98niQUIVsZAKkIrCAFM+95vzh+esCz5twoWpFtWmUmIucvM1Vs1kD8KDBCF2aZFetljTOrEh9oSRQSxg5pdjvjY+MyhxFTtAs34pXtrU8cz8ZpdADUW6/7/52hKce9/Wqt5Wu4/pP1CGFHVRMIF1bVYxtY4oOlNiwK8ZY5m/xrF1pqPOhlojD9UwbXqWlgS8e6+7srxg=; 25:/B+gbqSojM1q97IC8G15lzzXoYkw1LdTBad5duAhCFpg0pIA/9SFj+pg5yxROqmPnTuMQFvT0GkzajhlpsNAoM0Hj3Q269MJ3HNyxrpLEL2pdDsKXpcHEIEDz3QJ3Q2xh4wCqaJyVMNFlCGfFwFuIH5yK5IC4/u6eswzW2+f5J7Y9hsFtNlnzIvVXZK0KWKIjYrz1jReaoqaMvVsQyoQiWeRFA80iKmgFWYQ5xXW8b2txTjBXFLpvIVDU4SJOoo6 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:SN2PR03MB1933; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(180628864354917); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(8121501046)(13015025)(13018025)(13017025)(13024025)(13023025)(10201501046)(3002001)(6055026); SRVR:SN2PR03MB1933; BCL:0; PCL:0; RULEID:(400006); SRVR:SN2PR03MB1933; X-Microsoft-Exchange-Diagnostics: 1; SN2PR03MB1933; 4:q1MgXlejogUyBvs0gk/H1hqE8nzLjVRiYN9oOhl0Ben03r+zH9c6dsdkfL+1YnPX7Wy7KQdk+xODmRyOZZGKlBIqAdBBlUBv/e0CeUKdG3669mEhjbQz8uI5AH5P5dKqGtpwcNe5zBWO+3a4mr7I8AJ+cfaGgQ2qs+Csx4sHSF0TWjCQwut8aZkaxsqgzqDuo+4vEOscC1X19gA1zsiuW/u4ZDFwYHlpcG4/R0EwH8tfVTB71JQqMz+lt5T33GgOcPBkQRSnhysHDiziuDWiGLXOSrXk9nY00xXUyswkjtqE2B/MWu3jd6B8EeGbXOWwpuTsEsOtn3mckAxmahd7DmubNWYb9roHHVctS5n0/C6QXhMPLzIOSOzOPOq4X7ua66paYxzz11Wmk2nOYzgFs6dXA0prHi+D5pCgpbX3I2lAUXJ8/vQd3F/q/hob/sD42Yxt6dcx+bzW+g4DaYDYhdEceKKET+ewLqX3ZbmQzpHmarDQvFzwGVrBgWugbE6XI7xMqHPrUq7SQvXIxv3PNwfVqNP+PYfIHxOdOwjVJUR/1coTke1QNJ+GQFav+tSu X-Forefront-PRVS: 0990C54589 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN2PR03MB1933; 23:F3esRtMMv1bCfvpKZcXbmEjzzjeah1KlsoLOrNsMC?= =?us-ascii?Q?PfInHwuvMx1W6fF40ipqYCDZtf2puU6n/z+zEl89Qiw1SsGe6D0rykBVe8Np?= =?us-ascii?Q?MOocStyX0BvgnP0nWFHQ5a9ltpyqkA3EO7bDD2g7vu8OV3cSbIZE0+iz+kal?= =?us-ascii?Q?BueKRWs1AOuN2rOfGQ4QZw0+uP71wjpxf6UM2oMS3ysClkKmTpwu5IM84VDz?= =?us-ascii?Q?nFUVWic/ffWVlSUIafXPARjA880vsGU439hQiNqDdXFn0xiEoEit+S7hKMBv?= =?us-ascii?Q?2Q69QSTwl2HiSq5Hp271yY80bHGIVew9AezmCjEwXzKFftY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t0ApZCvFIyozlth2Fw4gViGasCJYBL7BGN?= =?us-ascii?Q?JoRiXvVyvJOcwCtUgEWOnBBu/7EY6LCaGDjSc5UGRmOSFkwiFAANfzc62WNn?= =?us-ascii?B?UT09?= X-Microsoft-Exchange-Diagnostics: 1; SN2PR03MB1933; 5:D6wh2RHrzOc4c3mq3k+OfjGd8/vm5xFZECWVAEW1A55uCPqcN6Dw5oq0W37Ck+jOqwW04eLNmXGVInlmAiWGA01ZVdrd09HPceWVRFaOPdfYmi/LFx4V2qAhm7TQA0q2mkcNn6EYfx0ksgC6CA4gT75NaUFunykW2Nis11FkoDM=; 24:Eyfi/rTtjObUwsLr7gtgE2R+zb/m/d0vCmTcLTUU1iJcHLMkzwJp8miOciYh2F0CvCceRYlq7SWQKyTWshtqtwRYpPph4z1i2Hp8eexEWlg= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jul 2016 09:49:12.7931 (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: SN2PR03MB1933 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160701_024935_253775_4942A96F X-CRM114-Status: UNSURE ( 9.48 ) X-CRM114-Notice: Please train this message. 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 , Will Deacon , Suzuki K Poulose 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: Will Deacon Cc: Suzuki K Poulose Signed-off-by: Peter Chen Reviewed-by: Suzuki K Poulose --- drivers/bus/arm-cci.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/bus/arm-cci.c b/drivers/bus/arm-cci.c index a49b283..e7b0b8c 100644 --- a/drivers/bus/arm-cci.c +++ b/drivers/bus/arm-cci.c @@ -1912,9 +1912,12 @@ static int __cci_ace_get_port(struct device_node *dn, int type) cci_portn = of_parse_phandle(dn, "cci-control-port", 0); for (i = 0; i < nb_cci_ports; i++) { ace_match = ports[i].type == type; - if (ace_match && cci_portn == ports[i].dn) + if (ace_match && cci_portn == ports[i].dn) { + of_node_put(cci_portn); return i; + } } + of_node_put(cci_portn); return -ENODEV; }