Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp3137697pxb; Mon, 18 Apr 2022 17:00:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwnogNqJkUztUG8+o4UmUstYXdWJVR2VLkD79QluhBcPgQCweyUQkSuT31EOkKVI/VOO5wI X-Received: by 2002:a17:907:7e92:b0:6e8:8df7:cf92 with SMTP id qb18-20020a1709077e9200b006e88df7cf92mr10667224ejc.541.1650326447656; Mon, 18 Apr 2022 17:00:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650326447; cv=none; d=google.com; s=arc-20160816; b=jAM/Tsnuyn/kZNqpdPA6n5Mu/Illhk+HbOs8vSYTCHS+HEvkGSUZ5eq4lo952RS+Tr ZP2UR1v0FxLFZp9mGUBuEsK6Atzgch86S1XhtS3MRISu1gnAw6i8UgFZjh8FIZFvEtxB hiWZ7JcYjoa0HTnXolr7vL2jnjQp/sdJkjWaHEKAXYwGDTptaW9ZQnF61rH6L0eYvEjt EwzZY/KrIkEFpIjmvawij3hlgvaJ9lGagns2LjnKC+6CckNhMF5872lkQa9ZMm65HrWl yp6oa9HrH3zXgdfF4sxIKNDnkJ+YL6dWgiRhDNXDhWKlYBmk7b9QljdPxkEIpVT8z4Q6 IoIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=+llioMWooqlXFc/JbRXDFsLPUVYzPNOTBevUwMzJVhw=; b=F2fCGgDKCG/sFwXohNeinq5GFZnt1U62zT90P646mKUAi9hQAK8RQkFDCyqW1xxXQ2 fVJskn+weiyFo0vMP/kTMroYrSXS9QdbFhERLaBLJhxdTfW+t5JQ5mEO+v4YZiW9cbIZ BgXcp6pTDT6yKn9Fhftt0TQAfQbiXyS57rGpygHRaOh9Ca3xToEe+ODsQNFWnPNBClx0 iRBHcNxWBYPE777VY0YhQL4K/N5v17KnZdLNHwDtt6Qt/2vXmrYYy1dUVzYBzzW8j4Qv eBDPRslWm1+UtAK5xQ85exwS3kFQjwd0f8TJ/u0fV/yEZBtesHEFcMlBlyrRSc89jMHN Nfkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=uf4epUu8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lu2-20020a170906fac200b006df76385f4dsi7309849ejb.1005.2022.04.18.17.00.23; Mon, 18 Apr 2022 17:00:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=uf4epUu8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243590AbiDRNtn (ORCPT + 99 others); Mon, 18 Apr 2022 09:49:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244315AbiDRNaT (ORCPT ); Mon, 18 Apr 2022 09:30:19 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 85FD1DFDD; Mon, 18 Apr 2022 05:54:21 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id DA806B80E44; Mon, 18 Apr 2022 12:54:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 24496C385A7; Mon, 18 Apr 2022 12:54:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1650286458; bh=VlG41S13f5/y/g0ypMqTWN26Ydn3eIe8IP0Nqf/LCcI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uf4epUu8vfRqzyLEgp6lbRVan4jGV6D8Mfbr7KLT/osp072aWdvD6HvcJGZp4zRrz CwEU3lpsRlZMkfHb0/syBZ6HwKZ0fUZaGTtIrva2vDqAPJujIORn2YzuHjuJBw8jo7 iFm+rxe48AlYSBy+hAh5LaWsnObEsEm1sbU4sUDg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Miaoqian Lin , Linus Walleij , Sasha Levin Subject: [PATCH 4.14 142/284] pinctrl: nomadik: Add missing of_node_put() in nmk_pinctrl_probe Date: Mon, 18 Apr 2022 14:12:03 +0200 Message-Id: <20220418121215.533813754@linuxfoundation.org> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220418121210.689577360@linuxfoundation.org> References: <20220418121210.689577360@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Miaoqian Lin [ Upstream commit c09ac191b1f97cfa06f394dbfd7a5db07986cefc ] This node pointer is returned by of_parse_phandle() with refcount incremented in this function. Calling of_node_put() to avoid the refcount leak. Fixes: 32e67eee670e ("pinctrl: nomadik: Allow prcm_base to be extracted from Device Tree") Signed-off-by: Miaoqian Lin Link: https://lore.kernel.org/r/20220307115116.25316-1-linmq006@gmail.com Signed-off-by: Linus Walleij Signed-off-by: Sasha Levin --- drivers/pinctrl/nomadik/pinctrl-nomadik.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/pinctrl/nomadik/pinctrl-nomadik.c b/drivers/pinctrl/nomadik/pinctrl-nomadik.c index a53f1a9b1ed2..69c702b366bc 100644 --- a/drivers/pinctrl/nomadik/pinctrl-nomadik.c +++ b/drivers/pinctrl/nomadik/pinctrl-nomadik.c @@ -1916,8 +1916,10 @@ static int nmk_pinctrl_probe(struct platform_device *pdev) } prcm_np = of_parse_phandle(np, "prcm", 0); - if (prcm_np) + if (prcm_np) { npct->prcm_base = of_iomap(prcm_np, 0); + of_node_put(prcm_np); + } if (!npct->prcm_base) { if (version == PINCTRL_NMK_STN8815) { dev_info(&pdev->dev, -- 2.34.1