Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3412196rwa; Tue, 23 Aug 2022 04:28:24 -0700 (PDT) X-Google-Smtp-Source: AA6agR5kFj3nwhvtepzMYIP2SCMddZwEWU6l20TocE5Q/MuwCScHFhJ1lXDl7Yv0BG0ze7EQ9Ixn X-Received: by 2002:a63:d617:0:b0:422:4d27:5817 with SMTP id q23-20020a63d617000000b004224d275817mr20521528pgg.412.1661254103833; Tue, 23 Aug 2022 04:28:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661254103; cv=none; d=google.com; s=arc-20160816; b=LS+r4ZB/UizR9570dUOGiNfmIeF/KRVzVrKvskfxH8Osrt21fJH8MfF1CdD/4s/2nn vcpwV7TZgMGUeCQv7J/oBaMicS7bYmxqPDWlwGO8H6IGJ+tuSLteiBsGu+LHII/w6mIc Dx91+8PWa+7jYX+HU9ouG1Qx5AR2iRqtMH4FYBdPAoaXGe73E82mAKW/4RlwCXVRBI3j Wy7iwh4Pl/Gy/1GzZD46olTBfz/lWAPznIqv86vToF49O1b/S2wU1iJ2zy+DyC4c5b0G QnxJJH1/PoHlf/SvhD2gL71Z2LIrOlXiBf/T/OyTqlCZfwDJUBHssvDDhH7/UaE7NNwe /JYA== 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=pZpHQa6QmO5xnAo805LIj2aYnw6AynkmcoZbSplQgQKt7NTisMygQl11kwm5nHO6N7 /fw3GFbaAjwv37EGBa3sGLDFpmqEHOSvtI0wGaD7Unw6/hsWO7UnOz5rDSgdg2TMOj4X VmTcMlYfxNnDV+Yk4CeFRnVVtQpGimC9sN1qqv5jPRcThYmkEs1X8KV+C327aAUCW6Db LeXhD1x4p45zFM4wDxbKCkF58cGM95WUS64Lor+soOcAReayo29oSWJcIevK2y+zO1DP sajme9wuk478+/Syofdc6XsyFa+Tpj3P4XxcWSIxVp7gokyJ9FCHgLwk4MAxAqp4y6BX FvoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Lrzhf91L; 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 v11-20020a170902d68b00b00172fca95f2csi2242136ply.326.2022.08.23.04.28.12; Tue, 23 Aug 2022 04:28:23 -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=Lrzhf91L; 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 S1355572AbiHWKgb (ORCPT + 99 others); Tue, 23 Aug 2022 06:36:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60996 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354541AbiHWKVm (ORCPT ); Tue, 23 Aug 2022 06:21:42 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C845582749; Tue, 23 Aug 2022 02:03:00 -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 658B06157B; Tue, 23 Aug 2022 09:03:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6687FC433D7; Tue, 23 Aug 2022 09:02:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661245379; bh=JLgT1YjRQoCyfhyImHJaeFjmVBeCtSn+RgWnOxdaFZI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Lrzhf91LgIeMFUPEZW5Us2GBLPSrEZDMKV/S8hp4kQGMxLaKS/VrXE1Wwpku0kJRM P5DR3Cyvvcb0Ae4F7sUgu5PWAzNjwrkD+/QVzFsWm8MpBSuCY2gL9ZqWUu6W1JtBor EuP26b/9Efb+DVroZmSMjg7VTUP+8jDZ/57XLi0o= 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.19 060/287] cpufreq: zynq: Fix refcount leak in zynq_get_revision Date: Tue, 23 Aug 2022 10:23:49 +0200 Message-Id: <20220823080102.259960163@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220823080100.268827165@linuxfoundation.org> References: <20220823080100.268827165@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