Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp1986277ioo; Mon, 23 May 2022 07:38:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzZhYahxMd4klarr/Tkd1AYVJI/WDyYuBYOu1XjeDglpW/H9+Fh3zTnxT4PvjlL0Lw302GU X-Received: by 2002:a17:90b:4a42:b0:1e0:34f6:fdf1 with SMTP id lb2-20020a17090b4a4200b001e034f6fdf1mr9560396pjb.175.1653316735159; Mon, 23 May 2022 07:38:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653316735; cv=none; d=google.com; s=arc-20160816; b=ab1q5yM/7Ee7+2s6aPkoGEFiPljFxMWSFz1+7B0j598ppAXxWu5hXgsN31/VYWoTXP HOueSIGvXu4t+XWiLd1ufE0Lijz0nLUQJRvoSeDnhYygsJM2hg1Z+OgsNjjfsbGSpV71 alI8/rjCxYjCCbxaH1dqUg0CTxf4g10ggOzF2OUEu3pSwU12tSJrSgxAjwavYx3JuDjA kfDB8CSIagPqF8Zd4sLIG9ucqzsY9ntJHHYb5k6gsulypIwsXqHn2zvJ0c+oFKOpmm4o WPSM6s91EPyzCbCDsTXdhALFDkmIGZnFpBOCg1j1+OjrFxGOSq2qajico4W19efUsOtj bs0w== 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=VsAAAqoiWJYzT060x2OOnd/EtlLZzAOosAhFcrN/2Zk=; b=PCiV7J1+FH0VBhxwzLkcPvM44QBi4RuixPXeReEoR7KyFZEAf7B41sZvgz+GIXIhDF 5bg34vOWAo0HQhtZOGTLG1dRdy5ZpbI2BTx2urjdS8SP+nCIszo6MqYDwH9PNy02sVaK njPW+2M3ecTIgzgcAzQNEx8D43iM9vkUQ+tc9Ktm4HKvGt//1XWVd3ydmI4BussQCTZH CBxB3IF7nVufC7Q9f1n8C1KcH3tj3Mr/r4ZWxNrNvXBBlhdC4CGpLk9ZdlrCenFkeCy3 Vi0qXaZHuZFQ5SrM5cMrHMsB1dLsFduOhY7Q3M2481P08SUjEXMvj+MbtOsY5rmsBRuW WLlw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=bIrL0ljJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id b20-20020a630c14000000b003c60d889162si9504141pgl.244.2022.05.23.07.38.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 May 2022 07:38:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=bIrL0ljJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 7AD3E1C13B; Mon, 23 May 2022 07:38:52 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237151AbiEWOir (ORCPT + 99 others); Mon, 23 May 2022 10:38:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50210 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237143AbiEWOip (ORCPT ); Mon, 23 May 2022 10:38:45 -0400 Received: from mail-pj1-x1032.google.com (mail-pj1-x1032.google.com [IPv6:2607:f8b0:4864:20::1032]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D16517E1F; Mon, 23 May 2022 07:38:44 -0700 (PDT) Received: by mail-pj1-x1032.google.com with SMTP id gg20so14267768pjb.1; Mon, 23 May 2022 07:38:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=VsAAAqoiWJYzT060x2OOnd/EtlLZzAOosAhFcrN/2Zk=; b=bIrL0ljJ2ar84oH/3npslA/NhLklqWI/M3QLvrYEuyTZLsvI7bcbd4KLAfCR6pIwJg eCQzxsKiOV5bfD3E3Mt5MvWZ3AtY3SRbhkW8d05YIq2/QE2Eeeth16o6EziC7tF2eL2S CDXTqlNVFypyYv2qy7v1tUYa5CgzaI5tPWspSG0FuzfpitLuDkXy9yWu9YCTpQ9HbY3m L5eov2Snw8Ebg0eQaKOZyGTlHoF4w1Kb5+p2koQIDd/RiOGqO73nQnpoSADUQoPRIb5G Bf3r0/8sO4wSkc7mSSs/IYNOKFTHG2ts9iX4TPyheZgPahvh34aCIrxC3Qcvrlu15xMU p02g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=VsAAAqoiWJYzT060x2OOnd/EtlLZzAOosAhFcrN/2Zk=; b=f0K57csno82Un5ZbNDi2yQCA2U4/PNxIfZpinongr5JpqzSRg5B5qwvSaz6jy2L4DZ ElS5u79UzsXILIQPJBkVTdB+e/4qm9GSWIL9j24n2TEKGCe5qob/TuLOf3hLldG48Ufv uflocejgzSoOBVtEDMTCdgEg6Oed0UzNPoJtit5tfceWJxkYi63omiebvoPDX4ez8RvR +r6qROlg4IPqR8t3XBjufhrMCIe2DGtiQ6fBQkliQCzBEFdahIlPCCe5egNl/oFMt/TF XdAK7Ol09CJSq/wYROFf6cBWkwar7V+2Mf1Qv5g47K3k+XR1bXAMTLZ2yfKwvwj9Y1ME 9S6A== X-Gm-Message-State: AOAM530zyKoYMexL5EJS8XUz2laU7MJe38JQvb+EXUkneOBNOeuIne2A a+tbK5BVaGCvEV4GRSwz3SerZHa/Sn7YWNVp X-Received: by 2002:a17:90a:bb16:b0:1de:fd98:94c5 with SMTP id u22-20020a17090abb1600b001defd9894c5mr27400110pjr.48.1653316724163; Mon, 23 May 2022 07:38:44 -0700 (PDT) Received: from localhost.localdomain ([202.120.234.246]) by smtp.googlemail.com with ESMTPSA id s67-20020a637746000000b003c6a71b2ab7sm4857972pgc.46.2022.05.23.07.38.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 May 2022 07:38:43 -0700 (PDT) From: Miaoqian Lin To: Peter De Schrijver , Prashant Gaikwad , Michael Turquette , Stephen Boyd , Thierry Reding , Jonathan Hunter , Stephen Warren , Mike Turquette , linux-clk@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Cc: linmq006@gmail.com Subject: [PATCH] clk: tegra: Fix refcount leak in tegra114_clock_init Date: Mon, 23 May 2022 18:38:34 +0400 Message-Id: <20220523143834.7587-1-linmq006@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, 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 of_find_matching_node() returns a node pointer with refcount incremented, we should use of_node_put() on it when not need anymore. Add missing of_node_put() to avoid refcount leak. Fixes: 2cb5efefd6f7 ("clk: tegra: Implement clocks for Tegra114") Signed-off-by: Miaoqian Lin --- drivers/clk/tegra/clk-tegra114.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/clk/tegra/clk-tegra114.c b/drivers/clk/tegra/clk-tegra114.c index ef718c4b3826..f7405a58877e 100644 --- a/drivers/clk/tegra/clk-tegra114.c +++ b/drivers/clk/tegra/clk-tegra114.c @@ -1317,6 +1317,7 @@ static void __init tegra114_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"); WARN_ON(1); -- 2.25.1