Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2927712rwb; Mon, 15 Aug 2022 14:13:12 -0700 (PDT) X-Google-Smtp-Source: AA6agR4insdC3+7/Ct5blNr/Ip79eLwLTRCfmtA5JS/GFHOf7iRSMbO6jJDxIb7uGXwzdTcnvmyz X-Received: by 2002:a17:90b:3c0e:b0:1f4:d764:99f8 with SMTP id pb14-20020a17090b3c0e00b001f4d76499f8mr19887928pjb.91.1660597992137; Mon, 15 Aug 2022 14:13:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660597992; cv=none; d=google.com; s=arc-20160816; b=TPNzorszXOGsmvt8E2AuKcBvVxE9XWYDSnLgamfiMjN5XnV3KskFgCB1Iuo88H8jIR 32F/voxktcuQShfC7f5Yn1t92/0VZqWvQgaaMxGe547QAzNbS63ki4FIJ4upUM8G+8wI 6hBMqk+d+kEH6QKJPv3RxDrkvKmiRuSN1ctdU9ACAtl3QFddjgQJ4qFasPymckeMynsv sdI6mQLKR/MdY9G8DTPHi6mD5/rCBgRhMc/8kutIoaAMMy502UHOLW/iZ+FJ0ans6Rzw sKTPqQw4GKQLknhhmK/FQbk/CMvxGy6qkIurV9N+3zWSjWdeM4KXMTkQ6h8E9aHk9i8v fMdg== 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=dVKkeyDJV+IQeQiv6xBtT9Endr2Q/oQAvfbpJdW2qmZXrg7uim41Iq4Oz/ttT/2dBr +WMY7OE2dfGVZuC+Y6tcFv7Tl9PzC3ZieUBrSOfAm/4aS1btVMEn1xYM8Is6C2kNm5wZ lUkGmkFOen/B8+S0hkCvW/QH9vgdT17T/BY3SLTJC3sYWxmzcXjIi9B/B0UVZsbNsjaL JfROOY3o1/uy8Z6vpdy9OJjg+nJ+ytXjZU9j7KdF3RH9vgjdRkDJ44dPk3tRs87eD+FJ oAeJrTOXO24Ni3bRlAr3QJIDUsqdcWiS+gorzt52RVgEtnGzIoHVR4l2W6JYwylJv8Tj Cg0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Pduex8hP; 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 a6-20020a630b46000000b0041ca4aef3d4si11163003pgl.44.2022.08.15.14.13.01; Mon, 15 Aug 2022 14:13:12 -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=Pduex8hP; 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 S1346467AbiHOUgM (ORCPT + 99 others); Mon, 15 Aug 2022 16:36:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41264 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348083AbiHOUcE (ORCPT ); Mon, 15 Aug 2022 16:32:04 -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 61374A8CC1; Mon, 15 Aug 2022 12:05:13 -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 90549612BF; Mon, 15 Aug 2022 19:05:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 93BACC433D6; Mon, 15 Aug 2022 19:05:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660590311; bh=14BO3jFRo9LTUBo+dV5YyJ4Ptn7JKSUmnCiFGI1LRj8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Pduex8hPIBc+hnb9rJ9Y6N/TfN7l5SgexSyu3v2/bZcPj5pQ4VptcjRvXvwEm3V64 m9WO3mIbogD880TOqxcDn59NyTXBDowxBc0XHIei9spYP3iloPulP9+GFUOvfVeLI3 jIAH4PvGXqZuj/VgT9MxiRRuYLToqtEtdSkQFJtQ= 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.18 0219/1095] cpufreq: zynq: Fix refcount leak in zynq_get_revision Date: Mon, 15 Aug 2022 19:53:38 +0200 Message-Id: <20220815180438.748623275@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180429.240518113@linuxfoundation.org> References: <20220815180429.240518113@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