From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3D33E847E for ; Fri, 10 Mar 2023 13:46:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8B735C4339C; Fri, 10 Mar 2023 13:46:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1678455989; bh=o/b8Su+vJlb8QpcTGMT9cZjZhdi8zO6yHols4zfX/IM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=m9thPnqXdgjhu4D8airaZynRfvNp223jyOlKADNfNmJxIPuxCwZi+jo3Ye180nrom Ze66hF6AxmsiYGGWBsCb+CnVMqEjU0SROAK6P9xjx9ISrGpg5DmTWCSAseTqC00BTA VjeaMaMM2qlDF0ZiC5W/Bbfm/MzbST9Ge6UnwzgU= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Miaoqian Lin , Marc Zyngier , Sasha Levin Subject: [PATCH 4.14 044/193] irqchip/irq-mvebu-gicp: Fix refcount leak in mvebu_gicp_probe Date: Fri, 10 Mar 2023 14:37:06 +0100 Message-Id: <20230310133712.449430263@linuxfoundation.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230310133710.926811681@linuxfoundation.org> References: <20230310133710.926811681@linuxfoundation.org> User-Agent: quilt/0.67 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Miaoqian Lin [ Upstream commit 9419e700021a393f67be36abd0c4f3acc6139041 ] of_irq_find_parent() returns a node pointer with refcount incremented, We should use of_node_put() on it when not needed anymore. Add missing of_node_put() to avoid refcount leak. Fixes: a68a63cb4dfc ("irqchip/irq-mvebu-gicp: Add new driver for Marvell GICP") Signed-off-by: Miaoqian Lin Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230102084208.3951758-1-linmq006@gmail.com Signed-off-by: Sasha Levin --- drivers/irqchip/irq-mvebu-gicp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/irqchip/irq-mvebu-gicp.c b/drivers/irqchip/irq-mvebu-gicp.c index 17a4a7b6cdbb9..6d9761423cbd6 100644 --- a/drivers/irqchip/irq-mvebu-gicp.c +++ b/drivers/irqchip/irq-mvebu-gicp.c @@ -239,6 +239,7 @@ static int mvebu_gicp_probe(struct platform_device *pdev) } parent_domain = irq_find_host(irq_parent_dn); + of_node_put(irq_parent_dn); if (!parent_domain) { dev_err(&pdev->dev, "failed to find parent IRQ domain\n"); return -ENODEV; -- 2.39.2