Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp6812874rwi; Mon, 24 Oct 2022 06:28:55 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6DgZVc1VTQMvmpbTgH0GMOnAgJr/4G9EAAC0RwJhufTRVZE4k1cCTWHpJuodqTj0gyPqgJ X-Received: by 2002:aa7:d9d1:0:b0:461:9556:23e6 with SMTP id v17-20020aa7d9d1000000b00461955623e6mr9213128eds.25.1666618134768; Mon, 24 Oct 2022 06:28:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666618134; cv=none; d=google.com; s=arc-20160816; b=I/bnwPuxH3zZKtypySACx/SPd5jeKZotNMnNpul32WynEjs37TMWsGKB0j+cXzW6Ri BE4h7jzlk4IT7ybaY3dShRRrM3z02qWrw7uXVja5HaI8eBkOkRml4AV4WCP+e2yISPk3 I411+ORrKD30tTfutXj6Vp0PH5tSNYBE0yeQpEvMe8qo+JjlIRRmIKyOrpLLgLaiZywn vioXyvON5j6tdpscqLiqD6kMeqMoWzVDP2je5rUsd3e/tIIT+C4pnQWfqh3ZyB4/tsCu W4tGsaZrrwmmbvvxIoHMuEtxkNs1x+UoKFgda7Uy8wPyPYps8ZgaKeMJz0D/vRzHG3Zq 3y7w== 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=8c1j/M987/nKWBPZqILrwgvxQGNxgsfOaNFoR1kvF1g=; b=XwXmZOR31Q5K3URY3GudrUm/5f48bvnAtKGBFE1lyH2hMBv2zsbMO4ZGnzaW9ERNN5 OKLF63DhVqQvEoqIP9qvuNArUtYQsaLBr032GFstdEqT58P/U4VQID0dhlL0ZGK8Co28 KpPfgwCUAuk/dSiHYUNpstq4l/NnAhDADxB10TZEkYAcVjx1/Hy+3wRemw1chupDyj9p Ggz1BB3SD+HpRRQQjMABhl2LZVX20F61I+cFE13t8qFeQ3FCoh27iE4bItHyHUxcmqLz u5xUQxU8azh4lhLoeWyRbnramTcGMSBiWkf4j+wxwd6oxYhXkc/dTLu9elMbKBRz0s/N BJWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=t9w4b3nu; 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 b6-20020a056402278600b00461d375794csi2436611ede.608.2022.10.24.06.28.29; Mon, 24 Oct 2022 06:28:54 -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=t9w4b3nu; 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 S231396AbiJXMIA (ORCPT + 99 others); Mon, 24 Oct 2022 08:08:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42050 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229936AbiJXMFJ (ORCPT ); Mon, 24 Oct 2022 08:05:09 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B263A7D1F1; Mon, 24 Oct 2022 04:51:33 -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 07CB1B811C2; Mon, 24 Oct 2022 11:50:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 63185C433C1; Mon, 24 Oct 2022 11:50:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666612231; bh=+xRN65h8XMr3o6/9muZHdrbyw84AGq59Ye/oG3pC+jM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=t9w4b3nuipwro2rbGguMhmxDNvAvAFX7w1R+h/kqLNKkGle/AsYYf3zPCllSypqYD +DRcIRdkS08phfsYt/0O9gX+3VudrNrre6rzZ03tFOOGL+pBj9w78ynYaj8todbf3j ux+p4l9rbcNHvluPQbsMUvQWoqGztnfbkntyMvI4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Miaoqian Lin , Stephen Boyd , Sasha Levin Subject: [PATCH 4.14 119/210] clk: tegra: Fix refcount leak in tegra114_clock_init Date: Mon, 24 Oct 2022 13:30:36 +0200 Message-Id: <20221024113000.846085929@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024112956.797777597@linuxfoundation.org> References: <20221024112956.797777597@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.6 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 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 db16a80c76ea395766913082b1e3f939dde29b2c ] 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 Link: https://lore.kernel.org/r/20220523143834.7587-1-linmq006@gmail.com Signed-off-by: Stephen Boyd Signed-off-by: Sasha Levin --- 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 fd1a99c05c2d..8c071a8fc710 100644 --- a/drivers/clk/tegra/clk-tegra114.c +++ b/drivers/clk/tegra/clk-tegra114.c @@ -1343,6 +1343,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.35.1