Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3390442rwa; Tue, 23 Aug 2022 04:07:11 -0700 (PDT) X-Google-Smtp-Source: AA6agR6G74INtZmFdKXu+2nLXMOTT96sNIKsk88TYId0IU8aYmLfDSXjbpamKj2Oy+ePrK4uguvu X-Received: by 2002:a63:ad0d:0:b0:41d:433:8c42 with SMTP id g13-20020a63ad0d000000b0041d04338c42mr19999368pgf.105.1661252831056; Tue, 23 Aug 2022 04:07:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661252831; cv=none; d=google.com; s=arc-20160816; b=mfjcD766aV/15ov+C5UrF1S8JdIgTcK5DBeyrsUAQFNlXF8X7iSUK7Ovq03FcjkkGh PNgG3HCmoZe46YXSG81QEjcUq5cUvfsT9Sq8SuqYu7k9GndY0fl6rDAMGxsqTFqXb+4c hL7cGr9lkSMmRmNNu2BivxDv7/QwZQmVkTGlU+mELwqs40LuGmAY2StYmIJr3udFbciz A7FcWD4UABA6Xn+lsfapAIstZh9M3/lzdM8tbvH1TozV48sNB6ufFJCJj+yn4RFDhBlT zQCTZMoeHhCBl21JsYAuryTiYRH8v5azFK1PzRijgr4srCv6ukOYYdRoJxytH62y4VcG BqIw== 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=B1RiqhTsq1XzK5tZzcbfHiH+Gt/0YioSE0d8AoVYJ1Y=; b=cZsdOlFwfwKNBpj45hkwj8T5oMb1vVZjrryI+aPB+fJaT3ZoPKSOSYG4fh0OQZZY39 MCTmlD3GNdO46HC/MZLIboPQaoWGszDJcUfsH84RAKrlMR/5BQ9wtLLb5D09XoPgcqne Ls226BT1aHUh7Ty/3kuWbRwVtUuaEZsH2enmOmhbqHjI+SiinJXmH/SZODlM7/lr3Baq VP6Htifxv/q0G20vcy3rEgsy4rcIKO9KTkgGzl8wxkpP3zgFP8YHZBsL/2TWXJmsYcac /LmUfTzvrPLsGAqu030h3htnJLW0ky1EVhJkAOYhrRpRPHVpFoC+EMBRqtToqvFmwr7F UyrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=GI3O3i8s; 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 ob14-20020a17090b390e00b001f2082e15fcsi425389pjb.3.2022.08.23.04.06.59; Tue, 23 Aug 2022 04:07:11 -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=GI3O3i8s; 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 S1351076AbiHWJgo (ORCPT + 99 others); Tue, 23 Aug 2022 05:36:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39454 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351242AbiHWJfG (ORCPT ); Tue, 23 Aug 2022 05:35:06 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CDF7E95E5F; Tue, 23 Aug 2022 01:39:36 -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 CF7C4B81C6D; Tue, 23 Aug 2022 08:38:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3FD88C433D6; Tue, 23 Aug 2022 08:38:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661243905; bh=JLgT1YjRQoCyfhyImHJaeFjmVBeCtSn+RgWnOxdaFZI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GI3O3i8sb4GMGEWsb9o52i6/itAK5gQDRF9U5Szbx13lqZkeoBaoBST0RC86xeYSf /pHts2jMJ202u5hsFttmvghL5WaFLfGFQkL262J1eBw92IdPXtsAIb/6Mf3ajhHRzK JKEeoqJcz76yFlyrNGtf3OTk/cFgOpFcoZ8mwO5Y= 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 4.14 054/229] cpufreq: zynq: Fix refcount leak in zynq_get_revision Date: Tue, 23 Aug 2022 10:23:35 +0200 Message-Id: <20220823080055.643224062@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220823080053.202747790@linuxfoundation.org> References: <20220823080053.202747790@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 6aba9ebf8041..a8b1b9c6626e 100644 --- a/arch/arm/mach-zynq/common.c +++ b/arch/arm/mach-zynq/common.c @@ -84,6 +84,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