Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp6129084iog; Thu, 23 Jun 2022 11:58:38 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sVqV1ubzYFljzk92MMONbFZuI1nbmHYJLBkf10MsBBaqTFyH9FvbQLb2/04UzOYb44EcGh X-Received: by 2002:a17:906:ce:b0:718:bff8:58c3 with SMTP id 14-20020a17090600ce00b00718bff858c3mr9529171eji.512.1656010717824; Thu, 23 Jun 2022 11:58:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656010717; cv=none; d=google.com; s=arc-20160816; b=KKClmpy9tl0VTM+DJ+1wPwc092maiTzuXThm601BT+O035210eUGLmiEMl4r2TtDfp qcT/kNmnlrRfUGkyaoPUbYIt+1zPRj15jhhD6ZEiu40QvQN1JMu9nKDexcUjTWEOQMB1 Ym9HueBEElSZSg1rxh8P+RFqT37Qzt5SU/3DF+DmnNDeftaoTFmoA1YN7WOUj/CdP4NK IM0WDuVQQqSygW7xv1PkYaPsq4j3evTR5b6YD5tTcroUeK8wvg9rdsJYq7BORRjsfFHm /0Ky4dhO+yG/uNmfN/kYIW6JnoGl+ncMLRfshHLpi94Zi3WhfcECMfjw+3MbykNB3hGL JXng== 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=D9Osbe3+RebcODziGxajBKdLTW3TIFWlNYC631mbejM=; b=VYDFd4KN0rMSAfY9h9Z7a+aqjQpcshPkBa5kaLlXCCe2YQlILOcbQug+/4mISC8yXm eFcWQCg8oyDDpVHH5KUDk+SOE1MzMCv90lAvC7c33v3uoE93wGm0ZAtw4FY6c9cD2FPd Cow4ggymQm/xGsoxS2ZKCj7wJvzGgXwLs/dOZkewNDELo4qO9tHUQbkjS9CriL9rLWkU TYycc5U4jaW7UiPzLqc5tBJEYtE34jsUgIOAOef4zQwvkcPELbYiBU4C7eXEoaUCa1Mk peE+ItucaawQeQ0cnPXi1i3THUKS/M5LRotTk8ydfnD1PD7PEj46kgybbDO1V1M4sgNH 9jPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=B+pQeuN2; 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 w20-20020a056402269400b00435df4369f4si393999edd.586.2022.06.23.11.58.12; Thu, 23 Jun 2022 11:58:37 -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=B+pQeuN2; 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 S232091AbiFWRLX (ORCPT + 99 others); Thu, 23 Jun 2022 13:11:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39070 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229528AbiFWRJE (ORCPT ); Thu, 23 Jun 2022 13:09: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 848594B1C4; Thu, 23 Jun 2022 09:57:31 -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 A6C2861403; Thu, 23 Jun 2022 16:57:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 84326C3411B; Thu, 23 Jun 2022 16:57:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1656003442; bh=SHTi1zF3pa0p1FdO0UqpPoroeo9nkhzpDP2J2+uPBwo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=B+pQeuN2hagj9G1iBH2BpyA8RqES5IW/BycNioLok+4mAJT8nTkHMqEh7gC/bK+6P f+7+iMAcLUmpvpwZAa4rCJ/3aGTC/TpT+wH+jGBO9Ioy3V24oJEdeCDazQotBhjmF2 W52WDpb9GvHuUpMGH7QwwtKYU+AQaFJ6ptmoNfEQ= 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.9 240/264] irqchip/gic/realview: Fix refcount leak in realview_gic_of_init Date: Thu, 23 Jun 2022 18:43:53 +0200 Message-Id: <20220623164350.865622077@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220623164344.053938039@linuxfoundation.org> References: <20220623164344.053938039@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 54c296401525..61024882c685 100644 --- a/drivers/irqchip/irq-gic-realview.c +++ b/drivers/irqchip/irq-gic-realview.c @@ -56,6 +56,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