Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D7BE5C636CC for ; Sun, 5 Feb 2023 11:30:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229611AbjBELaA (ORCPT ); Sun, 5 Feb 2023 06:30:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38978 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229585AbjBEL35 (ORCPT ); Sun, 5 Feb 2023 06:29:57 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A956E1E5E6 for ; Sun, 5 Feb 2023 03:29:55 -0800 (PST) Date: Sun, 05 Feb 2023 11:29:52 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1675596592; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mP3XJsTShQL14hAC+mnjW3TmxZmxPDuuvtQahw08qMo=; b=LKw/e55/tpjYTJOaM0hxZcb1hJHTjblWzVlg82iMZARZgsmkoE79yJ0neH8HCmAwwBHKop LwQ/eDW/gvF/NRwj2YAJjdd/S3YaRJ5oXrEraBX7A67NhHM/RIQcbg3oQ7BaAhm6jB0ZXG 2TjpGEGvZDPvMw7wOx1KwdMGuCh+ODGG56bNJNdlDsbt/Z8letS6/+TtrfBYuqFcYv7UmO hq2LwXr5LYvmIWbotn8bxECwzLpuG+WdoXZBSAcDxcUxRQSpU+caJ8NiTiWEltNXBu0LLq C18yqHnYEPAExpi7zX32t0RzQsNl+gMFpS9vOoXi+hExk79Oz0OrNNuIpZCieg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1675596592; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mP3XJsTShQL14hAC+mnjW3TmxZmxPDuuvtQahw08qMo=; b=t+dx30LQf4QZvBYHW4j4+u+Bo1QHI/pB3Lsyc1IAlVlp+aKQPdH4tQUoYMKjby1OZ96ID8 /VKxkmnFy2CxgEBA== From: "irqchip-bot for Miaoqian Lin" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-kernel@vger.kernel.org Subject: [irqchip: irq/irqchip-next] irqchip/ti-sci: Fix refcount leak in ti_sci_intr_irq_domain_probe Cc: Miaoqian Lin , Marc Zyngier , tglx@linutronix.de In-Reply-To: <20230102085611.3955984-1-linmq006@gmail.com> References: <20230102085611.3955984-1-linmq006@gmail.com> MIME-Version: 1.0 Message-ID: <167559659238.4906.13590911560182651325.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the irq/irqchip-next branch of irqchip: Commit-ID: 02298b7bae12936ca313975b02e7f98b06670d37 Gitweb: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/02298b7bae12936ca313975b02e7f98b06670d37 Author: Miaoqian Lin AuthorDate: Mon, 02 Jan 2023 12:56:10 +04:00 Committer: Marc Zyngier CommitterDate: Sun, 05 Feb 2023 11:11:24 irqchip/ti-sci: Fix refcount leak in ti_sci_intr_irq_domain_probe 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: cd844b0715ce ("irqchip/ti-sci-intr: Add support for Interrupt Router driver") Signed-off-by: Miaoqian Lin Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230102085611.3955984-1-linmq006@gmail.com --- drivers/irqchip/irq-ti-sci-intr.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/irqchip/irq-ti-sci-intr.c b/drivers/irqchip/irq-ti-sci-intr.c index fe8fad2..020ddf2 100644 --- a/drivers/irqchip/irq-ti-sci-intr.c +++ b/drivers/irqchip/irq-ti-sci-intr.c @@ -236,6 +236,7 @@ static int ti_sci_intr_irq_domain_probe(struct platform_device *pdev) } parent_domain = irq_find_host(parent_node); + of_node_put(parent_node); if (!parent_domain) { dev_err(dev, "Failed to find IRQ parent domain\n"); return -ENODEV;