From patchwork Fri Jul 1 09:41:57 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Chen X-Patchwork-Id: 9209665 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 241906089F for ; Fri, 1 Jul 2016 10:07:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 15F872869C for ; Fri, 1 Jul 2016 10:07:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 098DE286A1; Fri, 1 Jul 2016 10:07: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=-4.4 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, SUSPICIOUS_RECIPS 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 6F7182869C for ; Fri, 1 Jul 2016 10:07:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752554AbcGAKHc (ORCPT ); Fri, 1 Jul 2016 06:07:32 -0400 Received: from mail-by2nam03on0045.outbound.protection.outlook.com ([104.47.42.45]:61360 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752211AbcGAKHZ (ORCPT ); Fri, 1 Jul 2016 06:07:25 -0400 X-Greylist: delayed 995 seconds by postgrey-1.27 at vger.kernel.org; Fri, 01 Jul 2016 06:05:48 EDT Received: from BLUPR0301CA0014.namprd03.prod.outlook.com (10.162.113.152) by DM2PR0301MB0863.namprd03.prod.outlook.com (10.160.215.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.523.12; Fri, 1 Jul 2016 09:49:10 +0000 Received: from BY2FFO11FD051.protection.gbl (2a01:111:f400:7c0c::168) by BLUPR0301CA0014.outlook.office365.com (2a01:111:e400:5259::24) 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:10 +0000 Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=nxp.com; linaro.org; dkim=none (message not signed) header.d=none; linaro.org; 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 BY2FFO11FD051.mail.protection.outlook.com (10.1.15.188) with Microsoft SMTP Server (TLS) id 15.1.534.7 via Frontend Transport; Fri, 1 Jul 2016 09:49:10 +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 u619mwoS013455; Fri, 1 Jul 2016 02:49:07 -0700 From: Peter Chen To: , , , , CC: Peter Chen , Linus Walleij Subject: [PATCH 3/7] arm: mach-u300: regulator: add missing of_node_put after calling of_parse_phandle Date: Fri, 1 Jul 2016 17:41:57 +0800 Message-ID: <1467366121-14120-4-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: 131118401503334200; (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)(339900001)(199003)(189002)(68736007)(48376002)(50466002)(2906002)(19580405001)(19580395003)(69596002)(189998001)(6806005)(33646002)(36756003)(87936001)(8666005)(105606002)(85426001)(4326007)(97736004)(2201001)(229853001)(5001770100001)(106466001)(86362001)(77096005)(81156014)(5003940100001)(81166006)(2950100001)(8936002)(305945005)(356003)(8676002)(47776003)(92566002)(7846002)(50226002)(586003)(11100500001)(50986999)(104016004)(76176999)(7059030)(2101003); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR0301MB0863; H:az84smr01.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD051; 1:Jv6yO7WKlVE7tJrw8LzBL/sUgVusB86LuA0uXDBbuRFshVxau2nVNbrNAaLdy1sSAAmaG5TBw0mDDjv+ob6H1Lvv+K7dRNM2omU8jL2fqkeyYDfcmne2eWfNsBar9UmwmnePAOJ2u/13GHdIt1A6lSXUTnkscaXI6RAqWt5QvSBhhyqdU56QG3hkgstW2dV64EIqtObbPxPY073pzta7IAvpiaI4HJhwlypfTIi9/1mCw2Bf8S2uVlwlyFB71/MJS2hfFZqNo9g76wgVefalJBSGTWLW5tON8Lzb6nsY8Elz7cT5KScafvXEpgiAwki4leXWzqJdl1I9aVa0MZhknC7D5wPi6SOg1/QLLrG0nm7THNxqYEUYG7gn+wXUg1EDHRNDqfwzce0PAFF8Ar3vqMYdFzDprAhVW6jF/mywcrvYxYtIsUjXI/0QUJ48Fl2lvjB1QsQNk6BpzAvhCnf0iUYo9+Vn2AMxxKqCdN6phcHC8evR0fZ07+RHADKQL6YJzOyQP1N4J4mF/gOmWtyMtzBk/mXsClCMBjg2rs8Q8jqWAZ3x4fVOHBNTUiO+jc1TL0vec4ScW6eY2HemnB0t8bdcPdzFE1DkFSUftdrNDp2S5aq4Zj3Cu54TdzG4JNN2 MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 9529fd28-0ee6-4693-22ea-08d3a194f381 X-Microsoft-Exchange-Diagnostics: 1; DM2PR0301MB0863; 2:RLvwISVeHRBLdwzmRSP5N9AvzS0js7fLnObtpgpj0/B/gbujbXphQNGcG8Fw7Q16ToLsNUNfmx5VJZHhRnjxVUGAoj6wtN9fcmhFM6rE+tQSEl5jGetBD40Ri28A1OQ976tJR7+FYScr67U+Wa6wXXFsQPlsKVsK7wwXEsyjT97bm3CS6UEpISARy8RWkdWq; 3:vuId2TOmlGYk214fgtOqKoBWSIbGTktbRMu6oSEeKzRsUIkg6bTapE7Ojs4mh3NbpIgoe2J/rVFNsVQWvXzEUEzgEr54pZbjyZHO/k/AYLTS6tXbyrfUlM3/X8Jq0usFz/jNNKXPKLVNZktU7qKkkZl3Frn+F0/Yt+utpOgV7XFaDRRpQqhT9cDhcFfrBbcXkYXNSCkTWoto1RCsxq1tPPbNSjgo75VPbyTM2qktcyI=; 25:F4cRGqZiz2kC7gFAZs9W7Lg/Frdd4yDMbndxIhwiZJrTPnTshdzKT9FVmLp3swln1faeQs8RiM14NGTX1qjR2NRnvMl6tvJJMnJFlWE7OZYkgCnZ3ud8cttkm842pHX2QZ33aW0z/Lw+t4JYN+jU41Kpqat1edbeB01SFVOLgpiZ73tBW5XxbMH87yIrYBM7icO+OwPnkmYLMXXgpl4yc26dqhcp68ph4lsb4kdxx18WbNLi0XR6N2szJpU4GxNrqmnaDiE0IYrasINgzAMpKanrEKOJvjBddpc64drQAdky9Bbj8AuVdP/pNlPvR8v5DG7dMpoVXD3Y7jGdDCJ4FjvElDEJYHTTDSKbV3BAQj+Ov3Yuf7mI4OfOBX1p7/K5tYs1cWj3ZXilD3GzF/jltQf/bOeN9RrPPsl2E8yZq6k= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DM2PR0301MB0863; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(13015025)(13018025)(5005006)(8121501046)(13024025)(13023025)(13017025)(3002001)(10201501046)(6055026); SRVR:DM2PR0301MB0863; BCL:0; PCL:0; RULEID:(400006); SRVR:DM2PR0301MB0863; X-Microsoft-Exchange-Diagnostics: 1; DM2PR0301MB0863; 4:+jpeqZFVUk/KTNKlUX4Vl7bocu+zW304lidzqKlb2wINPTE0mVmgYJnvjs5pzqpXk84qSNRJ8w1VPsJGlu53/Pjh3/7ixwuN/ktww2rsJ9x4B1vu1nT/pXNIXmOQIRY7Bxj4s7nXh/X8ljNt1KOV4Coa75ssO+5K709Y+TsgXpBrp7O7cZ+IesovJslOkSBABE0poTVk4BxnN5KjMvHefvB7WJHKLc2iakKzAcRVm0ykPSm2rZstiUGEt5KB+TmsEzxCFe32npLbt1jVZ0epH3+6DVMehdRtbqtgIm3xCcckWNL3UkqytUOafUvMOtcOb0HwSJYgLWkCyOo4Zl3wsPmQJfQFo/LZsNWLRhiTue0PYkJw8hXn5pgZ7zWWreBm362PrYm1I3VLbY+XWLlf/Gplhlve0LoA9YQ4J2+ERjldMrfHBYy5446KOdvMD1IU609OcSP/A8CVvIZeClPUhrAaDMdI9RxKFHB/lrovglVbsfR6nUzJg5Hyx5wXlJpsRqclwRV+YT9iHKYhn9HmyQ== X-Forefront-PRVS: 0990C54589 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM2PR0301MB0863; 23:U7ViQx7uRMKFYdM4w9XUYJ3RmfFZtC5NacsH6nH?= =?us-ascii?Q?K/N9PNiZcoY8RCuehTpJGBytPgcPGJEsd70c6B7DUfeThd8JiTDqklkXD69Z?= =?us-ascii?Q?x52BOJt+3+K/74qvkcZnunl5/BTn+7FP/Y3pIdDqlR6FGan1eH/NtkbJ/+i/?= =?us-ascii?Q?bdfnymGQz2HX/2cHs6zSaUhZRea7vr8NH7dBUit9zUahn4AF3lmKUU3eZY7H?= =?us-ascii?Q?hN6lM6VxrfoZHtvdoRn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PK7SO/sFA== SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jul 2016 09:49:10.0838 (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: DM2PR0301MB0863 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 of_node_put needs to be called when the device node which is got from of_parse_phandle has finished using. Cc: Linus Walleij Signed-off-by: Peter Chen Acked-by: Linus Walleij --- arch/arm/mach-u300/regulator.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-u300/regulator.c b/arch/arm/mach-u300/regulator.c index 595b574..509643e 100644 --- a/arch/arm/mach-u300/regulator.c +++ b/arch/arm/mach-u300/regulator.c @@ -71,19 +71,21 @@ static int __init __u300_init_boardpower(struct platform_device *pdev) regmap = syscon_node_to_regmap(syscon_np); if (IS_ERR(regmap)) { pr_crit("U300: could not locate syscon regmap\n"); - return PTR_ERR(regmap); + err = PTR_ERR(regmap); + goto error; } main_power_15 = regulator_get(&pdev->dev, "vana15"); if (IS_ERR(main_power_15)) { pr_err("could not get vana15"); - return PTR_ERR(main_power_15); + err = PTR_ERR(main_power_15); + goto error; } err = regulator_enable(main_power_15); if (err) { pr_err("could not enable vana15\n"); - return err; + goto error; } /* @@ -99,8 +101,12 @@ static int __init __u300_init_boardpower(struct platform_device *pdev) /* Register globally exported PM poweroff hook */ pm_power_off = u300_pm_poweroff; + of_node_put(syscon_np); return 0; +error: + of_node_put(syscon_np); + return err; } static int __init s365_board_probe(struct platform_device *pdev)