From patchwork Fri Jul 1 09:41:55 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Chen X-Patchwork-Id: 9209619 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 CD920607D8 for ; Fri, 1 Jul 2016 09:50:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BE85428529 for ; Fri, 1 Jul 2016 09:50:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B328D2867A; Fri, 1 Jul 2016 09:50:51 +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 BBFD428529 for ; Fri, 1 Jul 2016 09:50:50 +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 1bIv4j-0002D7-75; Fri, 01 Jul 2016 09:49:29 +0000 Received: from mail-dm3nam03on0049.outbound.protection.outlook.com ([104.47.41.49] helo=NAM03-DM3-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bIv4g-00025g-QC for linux-arm-kernel@lists.infradead.org; Fri, 01 Jul 2016 09:49:27 +0000 Received: from BY2PR03CA044.namprd03.prod.outlook.com (10.141.249.17) by BY1PR0301MB0853.namprd03.prod.outlook.com (10.160.193.147) 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:05 +0000 Received: from BY2FFO11FD035.protection.gbl (2a01:111:f400:7c0c::145) by BY2PR03CA044.outlook.office365.com (2a01:111:e400:2c5d::17) 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:04 +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 BY2FFO11FD035.mail.protection.outlook.com (10.1.14.220) with Microsoft SMTP Server (TLS) id 15.1.523.9 via Frontend Transport; Fri, 1 Jul 2016 09:49:04 +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 u619mwoQ013455; Fri, 1 Jul 2016 02:49:01 -0700 From: Peter Chen To: , , , , Subject: [PATCH 1/7] extcon: add missing of_node_put after calling of_parse_phandle Date: Fri, 1 Jul 2016 17:41:55 +0800 Message-ID: <1467366121-14120-2-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: 131118401446799090; (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)(1110001)(1109001)(339900001)(189002)(199003)(106466001)(36756003)(50226002)(105606002)(76176999)(50986999)(8666005)(5003940100001)(356003)(7846002)(69596002)(86362001)(2201001)(81156014)(81166006)(48376002)(50466002)(2906002)(19580405001)(19580395003)(87936001)(189998001)(8676002)(85426001)(47776003)(2950100001)(5001770100001)(4326007)(77096005)(97736004)(229853001)(8936002)(305945005)(68736007)(33646002)(11100500001)(6806005)(104016004)(586003)(92566002)(7059030)(2101003); DIR:OUT; SFP:1101; SCL:1; SRVR:BY1PR0301MB0853; H:az84smr01.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD035; 1:EHpCsUUuvGsa5Aa8Xeam1axunRVoCesPkrZNOKleVjx2kmIinIWvepCQC2P1E9+Kap9QN5699hq0geTx9fwn0wWttJqemfdhjw0cmZQXpKIIAQ+gTIxuWbynIpR295BJaIrdb6g0ockGjg/zARJIZbCVYSOHGJao7bEEhCNQWKc+FRc0ZqnvXzM2fkl7vf0F+pFvWMRe7Qacm0nqnj68P5BX9EAvW07BYzPjcrzg1kebFJ+DBdvEc65vJTgjbg9N4cSFB0jccjrRKNp/35xrwJ2DrNSwZ6jn+yewJxYkBl4n69dt4AMvmuM6Bi/L+esa74M+vVzSAUqZOwxPUo8KL9cxoPldIou7dRQH5DA88cQ7FNNdBZmrppCEUSPJ3ABzPCs9Mdj0s4donKuPDJwT61xW68nDlGVuG2H6mZfNkYwozxlZtvZXZghvgA5TW8TKBN4SvNYGC5BsUm/j07VJR/FvicwjNTDP8jP/lgL/w1S815sk4b/v1anQ7mgDKTx/0ZdRyBhEhE2rdqN5IaFmN9wjnvy7tP46Dq0u5e2oPx4AKwMfCrHOS48QdzePfmwIQKRFo3R553vcPcGjeJLIxU7TtY4bP7Ge+fZkFIgakadPz3yJFLoZ67TgckWn6Iug MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 14713e27-f3bf-4af6-8591-08d3a194f035 X-Microsoft-Exchange-Diagnostics: 1; BY1PR0301MB0853; 2:SUuJ5aZdplLsTuD6XbsC867wVI06lAIGu8jllngNnZdkyrEoLEW0I2tY/EwZ153olPrBP75uoYrLRCWLO1dyz99/re1Jh+j7CvvrJF5QGoeopQKkd4ctYEzlf02r0qXAF4DpYNHR9o/YYr4F6kapK+yJ3MhMYxjTUTA9Y1efdeTfppnWEURYN/gDaBN+9yDg; 3:yBZ81tD/s2IWir8OjLfs3wmLy1EDaxN3G/KD9iGaYtIbYLp1VW+ZUhPfB1uQqBkuuOJzCuouTqXKL4DIFpiGZraN8xU4rJ59EIhCQMLx7p+jtNlMKZZD6Ocb50owNAtEqTiM0qjj+aeMzlfZnuLM1nIljdT5KQBaY5PEy+WRcrJRhANPmur4t6Qh70a2Crv19rgB1emWC9ZBnMFh4MTwVDu1jDRhgC0Sb8ctHLPwUeM=; 25:LPnPPDCbmjeGojQZRsXWDne1eqFxswnU+8Q8Ijf6Gfevgyzj/xXQ8u3J0PFabqE7PCMRM3UX/DAa52c1sFAshNUfW0bmtkpg3ENR8DimWhA4XXx+5zBR8urjZeBNvMY00XIT74ub3hQ8nOptdjhf8fL38Vg1uAm6cjKVv52UIvOsKhfUrJLDrJgLaCCm3TuouBMCtyvYbivq0r3hM+cifvlJacZpgLiIzh5zwTQrvUkeyDK8lAyS10f/sRyYkV6pbalOJWSB8WWBZfRjLeMLclHw97/ldEL0DsUWvASb9620F8VBboaIzK0mtECFLZqauY6Cd8wItI9fSiq7ZXzRbi9beBVg0gwvUyUZou1/8TcTY8jzK/J82EhkC6/dYRiMNkQwPzMiFiyoRpqOLqfk1x2+qeK35syy6HGm7KxQS6E= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY1PR0301MB0853; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0301MB0853; 31:PCAWVgN/dlFfDF48rX5mQkBpfey7DXVXLGeR+SryUZudUJG2+WI16YrsT0QKSYKnnej7eYtdhPNKolyFrWMynrdTpDIALPGU9Bk1S3hCdUet+HYU4wt1s0WiLjHXhzX/clz+nHvoR5ihV9KfqxnzoBS/FSvPhmBgG67PsCTN30cuXNa0bwQdSDLporNIl2cxoiV5zUccXe3e6RCj6MqPtQ==; 4:mSklRgdeqBwNrj8C4LM4/Ck6q42J9I83USw2M/RlxKC1zqxU0a2yrlHO2b1Ee/wb+VQgDZCvv/JueKi9g8PiKxkMrkNoxscFDbInx40mQGH/HQ9lxtL6mN1MV9jhqTe14m67b08e6sHnk8oKtC9qKXYF8jiQFVduauWf3wdvfTEquwF+MAQ/phdPNygIAYqQOpiXsi+HZ3HlEuHoDQYzemwRI4quHOyl2xeVs44Vn9uocHVuQUOJY2F39crLABGHsilQ7Edvjrz02xxJl2CI8+2GqdLxxUg/NsmWDYiQ7jGOHf1fbM3S9/W12XlO8x7kuqq5Y7Gat/pwgF0XX8FvieHooAd2LzvYJLeu1JM+vvA4sMQbRBCfDqLDOwu3PAafELve4uySYXS4vXN+m397HLuuqA64pmtYUbLpkhjfOzYGMwY8oUMO7tIHCBKcV1M4Wb2XmmbP1NDBzVt3QaIi/5wk2qVhiDUunNk8BGJ+QxLV6y7wEWsOiL2qlt2oM9PUY+heU4I231eR6GQ1ZoJ3pfKIfwQxg12UiHHfvLHl2BI= 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)(13015025)(13018025)(5005006)(8121501046)(13024025)(13023025)(13017025)(3002001)(10201501046)(6055026); SRVR:BY1PR0301MB0853; BCL:0; PCL:0; RULEID:(400006); SRVR:BY1PR0301MB0853; X-Forefront-PRVS: 0990C54589 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY1PR0301MB0853; 23:ddoK6vbSK9NmuQQK/dP5ueRluC5BhwiDkFBQLGh?= =?us-ascii?Q?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ehwRodH1EWDIYKmlY7GeFPzloYj1j2NUa1W7W5EpzpFGVxlo9l/XzVXPXP+LbZn/4R6qDBSFqvdVmV+LPHkCzFMql+reT8XKZg2RggimLNqe7J9KzBEe1ncYNYDuqyD+O0KcrUUA7IPsk6cVVbtsviq5+TZUBAlMvi9qPbihOzd8McFqmZJzt2bpcL9walFuXlS SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jul 2016 09:49:04.5551 (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: BY1PR0301MB0853 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160701_024926_987863_F2D02FB9 X-CRM114-Status: UNSURE ( 8.42 ) 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 , MyungJoo Ham , Chanwoo Choi 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: MyungJoo Ham Cc: Chanwoo Choi Signed-off-by: Peter Chen --- drivers/extcon/extcon.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/extcon/extcon.c b/drivers/extcon/extcon.c index 21a123c..86ea14d 100644 --- a/drivers/extcon/extcon.c +++ b/drivers/extcon/extcon.c @@ -1107,10 +1107,12 @@ struct extcon_dev *extcon_get_edev_by_phandle(struct device *dev, int index) list_for_each_entry(edev, &extcon_dev_list, entry) { if (edev->dev.parent && edev->dev.parent->of_node == node) { mutex_unlock(&extcon_dev_list_lock); + of_node_put(node); return edev; } } mutex_unlock(&extcon_dev_list_lock); + of_node_put(node); return ERR_PTR(-EPROBE_DEFER); }