Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2807962rwb; Mon, 15 Aug 2022 11:45:23 -0700 (PDT) X-Google-Smtp-Source: AA6agR4c0piBKNjs0UrtdEK+qF/vm3iKcDvF+zWljzA3dCH+oaxDKymqy7jb7msaGKKVJPSh0lIQ X-Received: by 2002:a17:907:c06:b0:701:eb60:ded with SMTP id ga6-20020a1709070c0600b00701eb600dedmr11496848ejc.178.1660589122730; Mon, 15 Aug 2022 11:45:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660589122; cv=none; d=google.com; s=arc-20160816; b=wt2ra85BoS+dur2MgY00+F9arMn8vQObL3Xd02nw0Z8gfDX3gQvKthOXNkKtZILYy8 EbjRBpXAECkrUEKU9nFHwJVa2XoOc7O3Uwk2LpiILlfv1prE3JiA336360rXnd+i44pr Q3DwMb0ZnExu0rotssaAw4SjM+F0V0vnpHGOg0A9/qLnvsdXLG90kyaylJkP31qOvRfw q4Ev+eDEFmOinczRjLjRIKSnQCqN4sU5/2A57RplYlun+vShbbYfzNQeNXfvvykei8wp V30zsctWj0ROTii5TDJgFD8HAg4A/1MTnZ6Qjf3letG2yHg3DPwTKk6FpuHvuDe8vMCR L+Cg== 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=jmrkhIm7pAeX4uUBs9IXtJaR+Q4SXmRa8cvIw+TPXW9MlpOSeUMoO4hl5w7hBIlpvW eJRC41MdpWstf+Op4qoXjFQkMQnr/5nLaFJl4klD1tvTfCr2r1z1vVrWjOo1wQy8bCnz HZAcu32S032OcYgw7qejqiddtTkKCmPRWhBz9gOpq+H4ZkN2+cVr/b6eKcqsNlrGzdjG Iulq5mLrHYAXRLN0rX2VVvsn5FTxvnnGzPcIWDvaKjRwshKm/q39WnpyQQjF1bLRA2MY lZry5HSQc7DuIs2UZdn5n3lxltiXXfm9DxZg7AuXOF7aL+T/cEgyhbJ+e28Sjru7eyrT ep3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=KGJfoLC1; 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 hz3-20020a1709072ce300b0072aebe7b648si8872402ejc.4.2022.08.15.11.44.56; Mon, 15 Aug 2022 11:45:22 -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=KGJfoLC1; 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 S243699AbiHOSg6 (ORCPT + 99 others); Mon, 15 Aug 2022 14:36:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50820 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243821AbiHOSfy (ORCPT ); Mon, 15 Aug 2022 14:35:54 -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 ABA103AE5C; Mon, 15 Aug 2022 11:22:48 -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 F192EB8107E; Mon, 15 Aug 2022 18:22:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 31201C433C1; Mon, 15 Aug 2022 18:22:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660587764; bh=14BO3jFRo9LTUBo+dV5YyJ4Ptn7JKSUmnCiFGI1LRj8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KGJfoLC1Nt9/jXcYDvjXIoOVZ25H2EK8OrSyOgQ6Ld9t+L8Th1Gyv4m0Lfx6lZ9F3 n9ejdrNxv0RkpidNp+Xnj8GTxhOt9qJSgBtZ4Y2eis1rrygXNpk4t+INOROkiiB2h3 oOXEqaimZgK82BJW9eUyJSLKl8XFqH3vjorAMEDQ= 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.15 186/779] cpufreq: zynq: Fix refcount leak in zynq_get_revision Date: Mon, 15 Aug 2022 19:57:10 +0200 Message-Id: <20220815180345.220794309@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180337.130757997@linuxfoundation.org> References: <20220815180337.130757997@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