Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp1975858iog; Thu, 16 Jun 2022 19:04:55 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uQWPrffS0jBGZcpAAhzzV/Uai6/MweMaS7QmObWg0GWSJbThTdA5rzAQ90UwN5KdRZOXkl X-Received: by 2002:a17:906:7386:b0:715:7024:3df7 with SMTP id f6-20020a170906738600b0071570243df7mr7101038ejl.543.1655431495396; Thu, 16 Jun 2022 19:04:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655431495; cv=none; d=google.com; s=arc-20160816; b=z5aYfImu0FwwjzgOnEmw3qrImmsuARN1pKRJMMmBWFlXaBMZMIUN6woNBhukyk4kaC qDU5r7CcNWahuocywUOKE1SB4LMYH3I9k+pUtO+ENAEPodsAaohffQbRCNT9ZHZZBpIi uVAAp1DQi/jGPpit+paD+TrISCl4XqvfVmZjcRVvfrk+9VMofT7mzBbqmCaGDbADkN3C x9zlyB5vK/LDNaqG02mpeE0eMk30PcTnZ1M/Rp6+0KtW29a/0qymwOSEiFlvWsJqOaFX ruyq1I7M4LUh7WQBNQbAcZq51qpNlE6cXP+SwD2bk2ocPtDAJPMuOst+eHmkm+U+gV1W dM3A== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=vsEwa4Q3Nuw5b/RYwlym5mojsapn/Da3u7pPStla0+8=; b=YL1JSls3qVNuhrM/pfyqPf66GhysnyHn857wjrCbRMbfcSCpIFnO5M+dFXrLg5SFXU rx/LetjOe4uaGQqSsBTVooPPBvvJWXNi+wK4/4kylYRJJYxvHwwjJnQ5RB2IgbRFoPFW 3bLQUKL3YuT6iSxuFwj7Y4kUAWWesl71EGtrl8Jz6uyE8+/w6WtcYLQGDn3tiDx14xZ0 h/0fD7ulxGF/e0ZFVUR+QIfJa55sm9nBte4Y3QPnRJis6GXqnDdHL0EKXkn4JfzV4xtu HlbRh1moxzvPkvwQ/Jy8XGhv89jHojcN6UwoWJpGnf0dVNRbEMDH3fdTt83Y71zTOxXV VuLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@126.com header.s=s110527 header.b="H7Q4Bi/n"; 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=126.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sd27-20020a1709076e1b00b006e89d168e62si261678ejc.820.2022.06.16.19.04.29; Thu, 16 Jun 2022 19:04:55 -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=@126.com header.s=s110527 header.b="H7Q4Bi/n"; 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=126.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379429AbiFQB7j (ORCPT + 99 others); Thu, 16 Jun 2022 21:59:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49134 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379390AbiFQB7h (ORCPT ); Thu, 16 Jun 2022 21:59:37 -0400 Received: from m15114.mail.126.com (m15114.mail.126.com [220.181.15.114]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5DBC960AAA; Thu, 16 Jun 2022 18:59:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=126.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=vsEwa 4Q3Nuw5b/RYwlym5mojsapn/Da3u7pPStla0+8=; b=H7Q4Bi/nV43shYU2Z7wWb NfWjklqmXs6CxrNTv1J0+t5733VEAfO9IftKHMgz9K/nbrw5zj2BFzCw9H9OZ9vR m9CEmPBok+H3+jiZIdITixg1AGHTDv+sJEuRaOYUZZ9spPysKSWHM2KjwKVQK3E2 HmXLyTfRf/eaCz/7hkMScI= Received: from localhost.localdomain (unknown [124.16.139.61]) by smtp7 (Coremail) with SMTP id DsmowABnNfH236ticEIdDg--.10993S2; Fri, 17 Jun 2022 09:59:20 +0800 (CST) From: Liang He To: pdeschrijver@nvidia.com, pgaikwad@nvidia.com, mturquette@baylibre.com, sboyd@kernel.org, thierry.reding@gmail.com, jonathanh@nvidia.com Cc: linux-clk@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, Liang He Subject: [PATCH v4] clk: tegra: Add missing of_node_put() Date: Fri, 17 Jun 2022 09:59:18 +0800 Message-Id: <20220617015918.4001865-1-windhl@126.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: DsmowABnNfH236ticEIdDg--.10993S2 X-Coremail-Antispam: 1Uf129KBjvJXoW7KFyrXw4fZF47uw1xCFykXwb_yoW8Xr1rpr yUXry5ArykXFs2gF1IvFWUZF98C3W3WrWjq34fC3WkZr4DGa48Jr40qa4jkFs0yrZYy393 Ar1kKr4kGa1Fva7anT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x0pM_M3fUUUUU= X-Originating-IP: [124.16.139.61] X-CM-SenderInfo: hzlqvxbo6rjloofrz/1tbi3A8jF1pEDvJlTgABsv X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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 In tegra124_132_clock_init_pre() and tegra30_clock_init(), of_find_matching_node() will return a node pointer with refcount incremented. We should use of_node_put() when it is not used anymore. Signed-off-by: Liang He --- changelog: v4: split v3 into nomadik and tegra v3: merge clk 'missing of_node_put()' patches into one commit. v2: use Liang He as real name for S-o-b. v1: fix the missing of_node_put(). drivers/clk/tegra/clk-tegra124.c | 1 + drivers/clk/tegra/clk-tegra30.c | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/clk/tegra/clk-tegra124.c b/drivers/clk/tegra/clk-tegra124.c index 934520aab6e3..a9d4efcef2d4 100644 --- a/drivers/clk/tegra/clk-tegra124.c +++ b/drivers/clk/tegra/clk-tegra124.c @@ -1471,6 +1471,7 @@ static void __init tegra124_132_clock_init_pre(struct device_node *np) } pmc_base = of_iomap(node, 0); + of_node_put(node); if (!pmc_base) { pr_err("Can't map pmc registers\n"); WARN_ON(1); diff --git a/drivers/clk/tegra/clk-tegra30.c b/drivers/clk/tegra/clk-tegra30.c index 04b496123820..168c07d5a5f2 100644 --- a/drivers/clk/tegra/clk-tegra30.c +++ b/drivers/clk/tegra/clk-tegra30.c @@ -1320,6 +1320,7 @@ static void __init tegra30_clock_init(struct device_node *np) } pmc_base = of_iomap(node, 0); + of_node_put(node); if (!pmc_base) { pr_err("Can't map pmc registers\n"); BUG(); -- 2.25.1