Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp6146282iog; Thu, 23 Jun 2022 12:17:58 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vwPGMQZgxPXPJXhzonHTTn0mIbR7Gd/creFyRl95BqajKLwbQQ6M216lABzSksIxcIHlyQ X-Received: by 2002:a17:903:2308:b0:167:6bfe:a800 with SMTP id d8-20020a170903230800b001676bfea800mr39959539plh.100.1656011878522; Thu, 23 Jun 2022 12:17:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656011878; cv=none; d=google.com; s=arc-20160816; b=CcZPrC2WXJW9SqoLKbwaQ6wZFf3BhIVPWXTNpnEmpJAft/MLFNBeBOXR1XgD1Udbig H5ss0l24GiypVwfrqOi8kDpOxb7+Jmf9Scb3LJ8JdhBqpCgm/Yp1DopByerAAPdSSbf6 4L9snrtf7LcwyBxvCJsg8Tiw9X8NKC9ceh3Ic7SeMAB8yUPTD4iRwUtah/qkFZrToFb6 wzr6TJp0ByC2oUtsDBT/cE/53e/zwYpCBWapS/u7TlwfOs67p9PcDi5BIxLhkivGl9Pr TKx3UWGVmuEd2mrMNJSZlskEwdlkDjyHeasMlqQxMBAnfh0s6qgeCrP48yXiwIa/4nlX qf0Q== 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=uGn2QUHqEECXkYtK2xcAFF0TLZOgqKQ6BpgbXZs1640rqlajUDg6Ut7hmj1jkb7RH+ J9ShKGQVgyK77rLeRJVrVOoeDQdmimoeEF/vEnKHSqD+SaZvWHURpY9lLgkMmhAPp9KG GvdYxqm4wyRGH2WORkwdwAw4wAs3dvI6IxkCr1T4/ikr+isC5iNji1gHp/ezQX29zBMo PWZFMGei52RwbpChUotpBELy2Lyar2RvjmPFm4ZTMo4Vk3y9X7OCPOrjSo5C4y+P3l42 M46F2A45HWG4/ZPVUFmyO/uTbgxIr4SyQoE0L7n0XWxO3RtcubNQ00kZF7T+TdJi5TZ6 6BoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Uu2Zxo+f; 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 t12-20020a170902e84c00b001637dbe1bc4si517631plg.44.2022.06.23.12.17.46; Thu, 23 Jun 2022 12:17:58 -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=Uu2Zxo+f; 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 S236621AbiFWSRT (ORCPT + 99 others); Thu, 23 Jun 2022 14:17:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35752 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236805AbiFWSQm (ORCPT ); Thu, 23 Jun 2022 14:16:42 -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 E4C9D7664; Thu, 23 Jun 2022 10:22:58 -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 A4B8EB824B9; Thu, 23 Jun 2022 17:22:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E7113C3411B; Thu, 23 Jun 2022 17:22:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1656004976; bh=OR3RQNyE27ZIpiYht6F5EFvIBUfv9fN4ckMXp3vcjGk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Uu2Zxo+fRWo39NyQuxFIsvpeP7ex9gnsQlSPdZnaL/n4Kt/q9VLf95K2aOg1qT5Fu c1vwR+jSOV73nXob2hYfsGYpdu4RugIwdiEmN3S5x6QXqVqB52jxDtKm2r9JWU5a0a 2EQ1VIiXADQDxgUgXRMjhKxOg4CCgvtyHqfTkj38= 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 4.19 209/234] irqchip/gic/realview: Fix refcount leak in realview_gic_of_init Date: Thu, 23 Jun 2022 18:44:36 +0200 Message-Id: <20220623164348.964864622@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220623164343.042598055@linuxfoundation.org> References: <20220623164343.042598055@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