From patchwork Sat Oct 22 07:24:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 7435 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp1098288wrr; Sat, 22 Oct 2022 01:10:19 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5z1OQJ0kMV9t5s/cJGJicv79kfL1N7uw6ZrCLqiUcodI7+25H7CgPc3HvWOQYHx+YHgo4u X-Received: by 2002:a05:6a00:1344:b0:565:e95c:6da4 with SMTP id k4-20020a056a00134400b00565e95c6da4mr23086171pfu.45.1666426219012; Sat, 22 Oct 2022 01:10:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666426219; cv=none; d=google.com; s=arc-20160816; b=lV2sQYjjZ3nJBV5xqeSdsP6kb0e7m56MMveYwLNW5wSEdlqLsXjaW6X/+M6uUd6OAd BObk6c+nNGZXkEZBWAZGhYWyFtFXHnbLNNg1wtFIJHnxYaoT7vaFJPYGXSQdOffJxhgs uctNy70HHa+/Hr83klh+x2WSAPvVHyEjxHyUnJEx8veCegCQ5UJP6AaqqB7cfVq5Ivnv oQqh4ajVjsvj3vndvu+7xxn0qHWRa7luBcsFT5Hykj+67aDvFA8TwKsJdMGBOzrUvxCh 6wDxik4et3A+4oPeDE9QtVLCga5mCYM/Swb2weDmsECyVgYOKgTeg47o+8fNf9ZgExcG ZVHg== 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=ZGWNBlpJ/VY/Xf7CXYrOhZ4mFqAF0xjOiYVXc81WScI=; b=ZmIEsQuSCf7flxP+Z9vX1RWuCG4phTf7w/0CSmTgkCPTPLAqKG4+ylITiezBKNM2vA ZrHuhrALuXQobUAW8AwuVNVPqFhToHLgmzd5yvWUrWPyiRh/1jyw+HeW48KrOeELuF+K RizgP0p4DlmqJOdI4AuZW3i9LO9En3PKN2e5Yi9ui/QpGYxqS5t4CyuZAM4Deo+XyCdl xoJkFlOWFkc7oKNLL2HXKXvP316EBO2hK/M59jGbcM8+6IKInP6g7BZvS75HEu/4nt5/ HmJR+E6lomXdWfIB2xf2ZL28rl4OxWwm5PI0fq+Wuj0crI0NrW1a2La9MGWoZQg2b5QB uf4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=oP+DdJ0w; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c7-20020a170902d48700b0017ed3e829fcsi30737489plg.365.2022.10.22.01.10.06; Sat, 22 Oct 2022 01:10:18 -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=oP+DdJ0w; 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 S233189AbiJVIJK (ORCPT + 99 others); Sat, 22 Oct 2022 04:09:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57152 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233118AbiJVIEz (ORCPT ); Sat, 22 Oct 2022 04:04:55 -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 72CE62D446C; Sat, 22 Oct 2022 00:52:23 -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 5ED65B82E18; Sat, 22 Oct 2022 07:51:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 79F14C433C1; Sat, 22 Oct 2022 07:51:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666425100; bh=r+FwyI0dw6wnWyUmx0/wuU+uiVosvkZ0FGImdLGy/tQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oP+DdJ0wUIDr8GQLJ2eoW5y4CJlwefDwqpbaaj8tqsfrt3PgKuOMKFjacNijbdqFL GP8seGR75wm1NoFPLEi/1gNuQJlbTzj2VtiKUoNsphr4l0tKThXWEJBq75h/zvgec8 WRoobg09LiIBPRDbNRPnhjbUyw78XxinhqMOR3m4= 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 5.19 388/717] clk: tegra: Fix refcount leak in tegra114_clock_init Date: Sat, 22 Oct 2022 09:24:27 +0200 Message-Id: <20221022072514.747723901@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221022072415.034382448@linuxfoundation.org> References: <20221022072415.034382448@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.3 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747374538725777015?= X-GMAIL-MSGID: =?utf-8?q?1747374538725777015?= 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 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);