Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp2940440iog; Mon, 20 Jun 2022 07:56:33 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tlUoV6gfF/Z5gJ2pvUmw7lC0EFKvvDNvlFaYaweEO8MlDc6LyVxNHV5h2qunm0sAUYO9ss X-Received: by 2002:a17:902:e806:b0:164:164c:5a63 with SMTP id u6-20020a170902e80600b00164164c5a63mr23834922plg.102.1655736993444; Mon, 20 Jun 2022 07:56:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655736993; cv=none; d=google.com; s=arc-20160816; b=Fi/6swFP35JMOb58qRf6yfUGnv5zDd/D08K8vnK4CrGeaFSkF16Ucc1QGFReCcL5vD RD/xtpq1HvM8o5NjNoFuppg2hqRgZJaVmEIuVADOcYxSTrgt5bHS0l+Q/dvbgRy9mHV1 Upmy5tV2+fzEUWqaYNbpkrWFopfv1XillW0/h39KkUlQ3XinXd+PSTcVryKVUlGg+WDr 9lz5EUwz5bcmeU7WYlgngOxKurdpFExBxYfVFf49q81My/NGMXrhJ5ijedzvPGuUmJ3S Ip9C4D+7xCEwva1fN6v+mPB59k549IWt6WPr0PItYZQGUQLTaEQdh7jEKOZBrfQLJFN/ 25Yg== 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=sab9UPp8iFL0EN7em7h4p/a5YU7RJdh7NAzW8qSUoQI=; b=PAY949RekZmm+C8VpbVnD+yrCzSFMkqwxTFNNnbDADt84VnGggX09YcWcnINeIELV9 bV0tyjcBzGApmr4ZwSRgctNmacjZVcYpiaoJ7vCEvvWOp9RTf4sP2hNJ/8bynj6C2vfb xWsITs6xfizyKt4EIkr/dTd+HUtG7RPoCYURl8uwPQ0ukrI7l3iBCfvRzWcegwZmadCO utqXx8BkHM8bnzQAxaf0i6Uky1NlX6OBgx5juf15ecf9cJID5drNoEjCwk/OHIvtuosq uXTMVx8AMTU2GflpkDSzITZwqdYOQwWAgOxvyefKMiUiaX5vBy26zIQnME0kniFVHor7 d/sA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=hXDlL5J1; 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 ob1-20020a17090b390100b001eca680b627si4800626pjb.152.2022.06.20.07.56.17; Mon, 20 Jun 2022 07:56:33 -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=hXDlL5J1; 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 S244400AbiFTNGi (ORCPT + 99 others); Mon, 20 Jun 2022 09:06:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50962 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244881AbiFTNEF (ORCPT ); Mon, 20 Jun 2022 09:04:05 -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 58A8C193CB; Mon, 20 Jun 2022 05:59:04 -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 17C1EB81092; Mon, 20 Jun 2022 12:59:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6DD0AC3411B; Mon, 20 Jun 2022 12:59:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1655729941; bh=OR3RQNyE27ZIpiYht6F5EFvIBUfv9fN4ckMXp3vcjGk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hXDlL5J1m1xtD7XY5ITderRHnBr3u7LM2YX1fDKqiZBcrJoPj0kBXzHwQfDFJbyCx uexurhJ3LF2SeCADydwQQPheVd0ASDreMolURmT1vMjCrf4U9kep6hCcclYfB3Ps6G KybXdRiWfrS6z4ePpn3v7YejonTKslc22774FgBA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Miaoqian Lin , Marc Zyngier , Sasha Levin Subject: [PATCH 5.18 091/141] irqchip/gic/realview: Fix refcount leak in realview_gic_of_init Date: Mon, 20 Jun 2022 14:50:29 +0200 Message-Id: <20220620124732.234984349@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220620124729.509745706@linuxfoundation.org> References: <20220620124729.509745706@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 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 f4b98e314888cc51486421bcf6d52852452ea48b ] of_find_matching_node_and_match() returns a node pointer with refcount incremented, we should use of_node_put() on it when not need anymore. Add missing of_node_put() to avoid refcount leak. Fixes: 82b0a434b436 ("irqchip/gic/realview: Support more RealView DCC variants") Signed-off-by: Miaoqian Lin Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220601080930.31005-2-linmq006@gmail.com Signed-off-by: Sasha Levin --- drivers/irqchip/irq-gic-realview.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/irqchip/irq-gic-realview.c b/drivers/irqchip/irq-gic-realview.c index b4c1924f0255..38fab02ffe9d 100644 --- a/drivers/irqchip/irq-gic-realview.c +++ b/drivers/irqchip/irq-gic-realview.c @@ -57,6 +57,7 @@ realview_gic_of_init(struct device_node *node, struct device_node *parent) /* The PB11MPCore GIC needs to be configured in the syscon */ map = syscon_node_to_regmap(np); + of_node_put(np); if (!IS_ERR(map)) { /* new irq mode with no DCC */ regmap_write(map, REALVIEW_SYS_LOCK_OFFSET, -- 2.35.1