Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3016890rwb; Mon, 15 Aug 2022 16:13:25 -0700 (PDT) X-Google-Smtp-Source: AA6agR4K81jzdW44JQxv5FjImFqhfrLfyR7YWkZTUMG/8sXDl99vvEoB1ScSitO+FozV9aGH+udF X-Received: by 2002:a50:ee85:0:b0:43d:3e0:6157 with SMTP id f5-20020a50ee85000000b0043d03e06157mr16793141edr.19.1660605205134; Mon, 15 Aug 2022 16:13:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660605205; cv=none; d=google.com; s=arc-20160816; b=dgxWb3jTnyEY2AmAKqVrZDUWmn7SXTQUPUxetuTfB2VF1eM7MfT8ZuyZ9HUpxIVkIS OEBTaLcNM/0qWbm8bH0NqCik898D/JNy6sLC87Wo4dRXMUH6YFqLOp7WXYrHAsT27bVi Apw+bhdn3v3PADrvVKYN9j5u8goRavyUgeaTKNIyF5qQusxecmkQRh1Anoipbb50b4gG m2c2cnKmhX/Wi18OpmC/Jg/muP8OV4WIQndBL9ZCe0Peqj3WSvpX5LyKCxWhalqiEKUM U5H4SuNz512gmAG6p5/wQzLk/jWhlB3MmgvRtfTtzD3l8h3rGQEbZwqy4roeqOCnNzbS 9lVg== 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=/C2XMKDdSZA+6j/89+cMLjQWfWFLAlJrggS6xBtEOfc=; b=wZclYFG1j7zlYzmBY0P7G6WPnVNoI+7+g7kBb0E5et2B09XmrzxcSWOf8du2HS0siE JETn/iSybyjV+9u4dacQ4eY6yyD84WbXayIkVQAxNEa8k0fmWvDWMcwWUccL7LV7lw8W wAVb+qit7mTDCevgPTI6VFL2YDsFBRLGljiTzTsHfsHlmpMO5Gy5QHZmClVk4V8smqnU wnls2FTiYWGxjg70bHgn5FOtmzZyHtkwKj4ZU6XHdmdaKKrsYFwFvLXHyeFTPIC7YkGo qu9lWtJSD7g66BRyMTHAHiNKCBamVJ/pwbhj2npmwwHTXx872/5vysiCHgAQ0sDLYZWS WmwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=nAKmHYrs; 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 h19-20020a056402281300b0043def0e25c9si10171392ede.20.2022.08.15.16.12.59; Mon, 15 Aug 2022 16:13:25 -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=nAKmHYrs; 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 S1351977AbiHOWw3 (ORCPT + 99 others); Mon, 15 Aug 2022 18:52:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60572 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351994AbiHOWuf (ORCPT ); Mon, 15 Aug 2022 18:50:35 -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 5025113729D; Mon, 15 Aug 2022 12:53:55 -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 602E961178; Mon, 15 Aug 2022 19:53:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4B83FC433C1; Mon, 15 Aug 2022 19:53:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660593233; bh=14BO3jFRo9LTUBo+dV5YyJ4Ptn7JKSUmnCiFGI1LRj8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nAKmHYrsYWapJDzTSZ5Sw/On54AYDzy1Ognq3ZWnQnAjeFMuVw9Yu4QeoX6CwOrO+ kNXaiuZU0UUxrLGlktEvofsqkbNjgtvdBvCLK9fhUBkOnScl33sJ01sr9Sx35kSdCU OXFPlkTzz8TeEU+jUmTDRGtd1AzjYqSYI1lNDyko= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Miaoqian Lin , Michal Simek , Sasha Levin Subject: [PATCH 5.19 0234/1157] cpufreq: zynq: Fix refcount leak in zynq_get_revision Date: Mon, 15 Aug 2022 19:53:10 +0200 Message-Id: <20220815180448.935782788@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180439.416659447@linuxfoundation.org> References: <20220815180439.416659447@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.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 d1ff2559cef0f6f8d97fba6337b28adb10689e16 ] of_find_compatible_node() returns a node pointer with refcount incremented, we should use of_node_put() on it when done. Add missing of_node_put() to avoid refcount leak. Fixes: 00f7dc636366 ("ARM: zynq: Add support for SOC_BUS") Signed-off-by: Miaoqian Lin Link: https://lore.kernel.org/r/20220605082807.21526-1-linmq006@gmail.com Signed-off-by: Michal Simek Signed-off-by: Sasha Levin --- arch/arm/mach-zynq/common.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-zynq/common.c b/arch/arm/mach-zynq/common.c index e1ca6a5732d2..15e8a321a713 100644 --- a/arch/arm/mach-zynq/common.c +++ b/arch/arm/mach-zynq/common.c @@ -77,6 +77,7 @@ static int __init zynq_get_revision(void) } zynq_devcfg_base = of_iomap(np, 0); + of_node_put(np); if (!zynq_devcfg_base) { pr_err("%s: Unable to map I/O memory\n", __func__); return -1; -- 2.35.1