Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp975449pxb; Wed, 6 Apr 2022 05:48:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxiCi5R3215dT7+lJ3ShWyrchh1A1LjMp5LmRURcXW+W0rUtJ3GRCb4pnkiHXoDtqXsn07t X-Received: by 2002:a05:6a00:1c95:b0:4fa:81f5:b9d4 with SMTP id y21-20020a056a001c9500b004fa81f5b9d4mr8744357pfw.49.1649249332169; Wed, 06 Apr 2022 05:48:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649249332; cv=none; d=google.com; s=arc-20160816; b=iKTJZYB/3bhoji9MoXideLF0a7Uj0LUd/ESKS50/id28vhV5aiOBSNIetMlwpVq6mE Oy2QZlWKHC32rVAhazksCTvUz1F1Sx5jT2Obnv4tnlVo5zL881maUKlVvl4b0Fd7sum6 Yq0GF63WZAgsjZbuxg/jORB/3cN7vBrppYkyWK6HtsCV5BBziyH7xd8cuSHJdaJowurQ LJyhywhbX3nSRsBlY4ofUI/yI7YRrtwtEJRyRkeUkqEe0mKf+XlLvImxv57qB5PDY7Vv V36bWDHcQr9QLQftDax4jvmDdZQATgWhYm2tTss6NzWgoIJGEnp+cnuNs11IblGHccEt vTAQ== 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=fBMAzwjT9/z6P1baIoB+ErpXLfi9td1ZIGkuZpMg/6A=; b=QAU1G3Qhv0K0HzRS+GXlHNqbxnRPCkQdiN35gr2lfr5ob6Mm+R4lILemhGj154jQbd fKsoV2daiiil0s44vrz+NssRFKE98H7zDT0uipvKro6nxGGToNFTtuybfD8GkfTBx4WW BG0V3gVJDqoHMhDBlBGWEb4djhcz+NeiG+OR8+s7q1XVLPTtavoA2ZFkDt38yxgG9Qbh LAkdBSqSjxW11Aqxl/WnejUwVjbD41KH2bafzFKQ5/hvZyfLsL/9NobK3nchUTCuZ7Zt R/Fpuf7fVbgvZHuKy3Sq92A32KfCpf3UuMv3uXi/U4CUg9lFVyjrK9qGyuNjshkvl0hj 5Jog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=gXx1GpuR; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id e11-20020a170903240b00b0015682eea101si11380810plo.557.2022.04.06.05.48.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 05:48:52 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=gXx1GpuR; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A3AE02E758C; Wed, 6 Apr 2022 02:36:06 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378212AbiDEUxM (ORCPT + 99 others); Tue, 5 Apr 2022 16:53:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39896 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349494AbiDEJt5 (ORCPT ); Tue, 5 Apr 2022 05:49:57 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 53E3CDE; Tue, 5 Apr 2022 02:47:35 -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 dfw.source.kernel.org (Postfix) with ESMTPS id E35FB61577; Tue, 5 Apr 2022 09:47:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0089AC385A2; Tue, 5 Apr 2022 09:47:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649152054; bh=JmaNtigfUnMcwsF3xKmTQqdXp5ARBWiDqFS0XyEvciQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gXx1GpuR4KcPx/DoIgn3G4W0MWNO2Fx8gtoXi5ngRhqt0aGer1Uou+6IpA3X7Bosv z6d45PWaQ3Aamx85oSiS/UkTGvc5OqMgOHvoxY0LzSCR2vaI0ulZAs1LXtZtCzdmIW oQGpp768z5sHDmyCp5HN5TdzQ6Uv9yajHGLC++A8= 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 5.15 638/913] pinctrl: nomadik: Add missing of_node_put() in nmk_pinctrl_probe Date: Tue, 5 Apr 2022 09:28:20 +0200 Message-Id: <20220405070358.964669519@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070339.801210740@linuxfoundation.org> References: <20220405070339.801210740@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=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 39828e9c3120..4757bf964d3c 100644 --- a/drivers/pinctrl/nomadik/pinctrl-nomadik.c +++ b/drivers/pinctrl/nomadik/pinctrl-nomadik.c @@ -1883,8 +1883,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