From nobody Fri Sep 5 20:00:50 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 87107C32772 for ; Tue, 23 Aug 2022 11:18:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1357308AbiHWLR7 (ORCPT ); Tue, 23 Aug 2022 07:17:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37564 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1357455AbiHWLPp (ORCPT ); Tue, 23 Aug 2022 07:15:45 -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 E2571BCC2D; Tue, 23 Aug 2022 02:19:31 -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 8594B61227; Tue, 23 Aug 2022 09:19:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7E1C9C433C1; Tue, 23 Aug 2022 09:19:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661246359; bh=xbxje7Xy91BKf6ztvGQ+0cfijGGWz58C+kaJ3TBrwCE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=i/YA5oN1YxyZ+c1lunS00ZVbbxTVwb2Q0v5tncnKZq5WUAESQP24iWZ67W35nPAeV XL4ibU5CeSYcGWhfNAMVIcXU3My5fCF1soDLhB3fLJ2Lbi4ZJWm2Duo9TtG1WBMBFa VqOiRSomoPSNHHOrnLFBPMWk/5BhTRbACpb9pFDs= 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.4 084/389] cpufreq: zynq: Fix refcount leak in zynq_get_revision Date: Tue, 23 Aug 2022 10:22:42 +0200 Message-Id: <20220823080119.139222678@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220823080115.331990024@linuxfoundation.org> References: <20220823080115.331990024@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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 3a4248fd7962..25530ddae1fa 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) } =20 zynq_devcfg_base =3D 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; --=20 2.35.1