Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp1879660rwb; Fri, 19 Aug 2022 10:58:26 -0700 (PDT) X-Google-Smtp-Source: AA6agR7REuLXygWh/LqPphE7x9+TJc/A3qUr8rKtgXDMag5Tr5zIlyRxXmirjwYy1Gz9JVKzBc7P X-Received: by 2002:a17:902:ce04:b0:172:9ff7:6747 with SMTP id k4-20020a170902ce0400b001729ff76747mr8015941plg.166.1660931906038; Fri, 19 Aug 2022 10:58:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660931906; cv=none; d=google.com; s=arc-20160816; b=DTElx5olSYTh/V4qkdVDt4DpETnJcBKUVIHWUw+DM5NmaVTBrbTCUfYZWRgIMnnL4k no/l/KbYgoYQp4C0DflkHaySUuYo1aglQmvf5Z/uV6BCV9+M9krj1zU7v80tG/NNn3gN UvM/5vc18vRFMOIOePo8c0JJG+Tt2C/PcfmI7oYTgHmjMy97pmb4cGdwYvs66iZ9a30f QJbh3hGLJxNHFbUokkcwxrjKvOkBE3BNGA+97ADUdjAdrJYp+4ndG17viWn5unWO/eh3 8AMyFIAE6W07o/l7lZGLhwRvCkWKyB+Pyw/l5ZFFHdq32boc3mXEbluES2mTbdj/L7zb yWGA== 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=Yi1FmKCsG93uBLMVILPD3Lti9jWTRVlhg0Mger0ASzrqXCFUfRfsVslYWmwC+iNXB1 NdbUeqhcezI2EfTUvqH1NopHxBzvtaVVYdmXuY63znSDFo16gDpR79qqYorKjVJpq6zf uoVGG7RgebyyJm20rgD69df00qpaTAhDRaScWnjrClDSHcNHiUw3uy3rMZ4mYkq+Kh16 LZfWrGlelLOJ9lZAlfvVLl2gQuNKLO+1SaeJmBPikIkxf5OIbpSAFj7isoK5QgV6nGrV m9evvxwr/0hiLm4phMBeke5l/5MZIM+9DvM2YxpN40P6XW9CTFcpouiClxwbc8c6Jizd v2eQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=KtutzwNu; 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 4-20020a631644000000b00429ead9bda6si4475947pgw.86.2022.08.19.10.58.14; Fri, 19 Aug 2022 10:58:26 -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=KtutzwNu; 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 S1351019AbiHSQAB (ORCPT + 99 others); Fri, 19 Aug 2022 12:00:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58062 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350753AbiHSP6s (ORCPT ); Fri, 19 Aug 2022 11:58:48 -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 A5324108F80; Fri, 19 Aug 2022 08:51: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 4DCFE61732; Fri, 19 Aug 2022 15:51:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 567A6C433D6; Fri, 19 Aug 2022 15:51:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660924312; bh=14BO3jFRo9LTUBo+dV5YyJ4Ptn7JKSUmnCiFGI1LRj8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KtutzwNuxk3GOsEL53rdHTY1O6KgoWcxkSYd3k+qt+u5lOYOb1ysbrzbpYagXoIcQ 1+SV4MoW1d2WpmpoXS38eFF5Tj7JEO0Q67Jt2OG0+6V/Tf2M2xG1Ama2yVBxHWhYpD TOMuJMMEPina8lENCFExIwQFzhRc6kGfsLkMuKD4= 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.10 129/545] cpufreq: zynq: Fix refcount leak in zynq_get_revision Date: Fri, 19 Aug 2022 17:38:19 +0200 Message-Id: <20220819153835.099495278@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220819153829.135562864@linuxfoundation.org> References: <20220819153829.135562864@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