Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp681655pxb; Tue, 5 Apr 2022 18:34:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwcTNKBJD6XPmuTEFKR5pxpscCm4obLPx1Mw3cM5UZozPU4fO1tJCXU4J1UBtjUahhN5om7 X-Received: by 2002:a17:902:ce0f:b0:156:5a4:926c with SMTP id k15-20020a170902ce0f00b0015605a4926cmr6113045plg.3.1649208852498; Tue, 05 Apr 2022 18:34:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649208852; cv=none; d=google.com; s=arc-20160816; b=Kw5P51feY9WlsrhhPyEZAHn2LAZQ7sA3kVZijtQgyl5r6vvycHTl4UseCIoLjETN5l 2HDnXMq+ePUEHFZuWwDGkKpo2V2n+UIrjp3MdDQeVRf/lZ4T3uF1S3pwtNQ6Ydhe4u2z RVcJsbP7KneUiOKy30mpUhfTDr074ykkhS0bGw6hKqMfmNLr+tkINlrPL0145x0+g3kr bQTS5PUU0kiOU6dcW+t7xtWhgfICI9KL5+8oKMuGlOJ+ClrGKOU3LlpKRuDdjfS3i3dP khC7k3wvEzd2NZa1UIhzPZ0Ep4tSQjE4jUa0HwQ/OKrsIP6AU0H9GDRojVlY/zo4a5a/ jbTA== 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=XYW841dIEgkbYv1Ec+avIRNbLePktKw5HUDVCGniYq0=; b=SOWeiGunLNfw6nhGaEfoQwmVzR0PykHij7yG0JTCO97dHU0gsYsQq8jQW2nGULW81I ZLtiyK20tm3PyJ7wa23fHJJ2USRoaCqX2BZ+XxPlc7YiktzuqjIgpwzcV6tUxtPnAq6I jF/ZER9weumnmERa9dykp2HeaCB5FO7nnJr/KAY8IAEFNAJw9ZXwi3p7w2GjAdH+ULUQ 70AH5SVby7C03qmJ6db19PAXwOlqCKJgc6IiSkQ82HZhCh3PF0h5gyyfBa+ctnpYlZsS DafKfQ4Ga6siIICTM/Q3wfeGqZy6T5I0pwUAMoK6QblMpRS+87WOHDEdDLkOUopRdQeN qtjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=uFUIl4m8; 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 g20-20020a170902e39400b00156d899e1c8si1999266ple.615.2022.04.05.18.33.58; Tue, 05 Apr 2022 18:34:12 -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=uFUIl4m8; 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 S243803AbiDEJJR (ORCPT + 99 others); Tue, 5 Apr 2022 05:09:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34820 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239498AbiDEIUI (ORCPT ); Tue, 5 Apr 2022 04:20:08 -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 2C611B2F; Tue, 5 Apr 2022 01:14: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 861E6609D0; Tue, 5 Apr 2022 08:14:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 95A04C385A0; Tue, 5 Apr 2022 08:14:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649146475; bh=xiVxqNXnPrd0umBKGvEaHQFbAeEbjAy7J6xMXFkVXKA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uFUIl4m83ZaGB1x0drXX6BueIA7YccekW7XaUuDHWxWTqqQG8Ur8tuXK/3Unolm64 p2kGwflIK5WGOFljDEPPrbNrCg9fvV/vxLdHxgPD3aXOVoh4HhLLM4E1p+AbmEoPF5 ylxHMo13hvFWepCKRIg2+7g7LUN5zCEiEG8ZB8fA= 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.17 0777/1126] pinctrl/rockchip: Add missing of_node_put() in rockchip_pinctrl_probe Date: Tue, 5 Apr 2022 09:25:24 +0200 Message-Id: <20220405070430.385573941@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070407.513532867@linuxfoundation.org> References: <20220405070407.513532867@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.1 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 89388f8730699c259f8090ec435fb43569efe4ac ] The device_node pointer is returned by of_parse_phandle() with refcount incremented. We should use of_node_put() on it when done. Fixes: 1e747e59cc4d ("pinctrl: rockchip: base regmap supplied by a syscon") Fixes: 14dee8677e19 ("pinctrl: rockchip: let pmu registers be supplied by a syscon") Signed-off-by: Miaoqian Lin Link: https://lore.kernel.org/r/20220307120234.28657-1-linmq006@gmail.com Signed-off-by: Linus Walleij Signed-off-by: Sasha Levin --- drivers/pinctrl/pinctrl-rockchip.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/pinctrl/pinctrl-rockchip.c b/drivers/pinctrl/pinctrl-rockchip.c index d8dd8415fa81..a1b598b86aa9 100644 --- a/drivers/pinctrl/pinctrl-rockchip.c +++ b/drivers/pinctrl/pinctrl-rockchip.c @@ -2693,6 +2693,7 @@ static int rockchip_pinctrl_probe(struct platform_device *pdev) node = of_parse_phandle(np, "rockchip,grf", 0); if (node) { info->regmap_base = syscon_node_to_regmap(node); + of_node_put(node); if (IS_ERR(info->regmap_base)) return PTR_ERR(info->regmap_base); } else { @@ -2725,6 +2726,7 @@ static int rockchip_pinctrl_probe(struct platform_device *pdev) node = of_parse_phandle(np, "rockchip,pmu", 0); if (node) { info->regmap_pmu = syscon_node_to_regmap(node); + of_node_put(node); if (IS_ERR(info->regmap_pmu)) return PTR_ERR(info->regmap_pmu); } -- 2.34.1