[PATCH 01/11] irqchip/bcm2712-mip: Fix OF node reference imbalance

Johan Hovold posted 11 patches 3 months, 3 weeks ago
There is a newer version of this series
[PATCH 01/11] irqchip/bcm2712-mip: Fix OF node reference imbalance
Posted by Johan Hovold 3 months, 3 weeks ago
The init callback must not decrement the reference count of the provided
irqchip OF node.

This should not cause any trouble currently, but if the driver ever
starts probe deferring it could lead to warnings about reference
underflow and saturation.

Fixes: 32c6c054661a ("irqchip: Add Broadcom BCM2712 MSI-X interrupt controller")
Cc: Stanimir Varbanov <svarbanov@suse.de>
Signed-off-by: Johan Hovold <johan@kernel.org>
---
 drivers/irqchip/irq-bcm2712-mip.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/irqchip/irq-bcm2712-mip.c b/drivers/irqchip/irq-bcm2712-mip.c
index 9bd7bc0bf6d5..256c2d59f717 100644
--- a/drivers/irqchip/irq-bcm2712-mip.c
+++ b/drivers/irqchip/irq-bcm2712-mip.c
@@ -239,7 +239,6 @@ static int __init mip_of_msi_init(struct device_node *node, struct device_node *
 	int ret;
 
 	pdev = of_find_device_by_node(node);
-	of_node_put(node);
 	if (!pdev)
 		return -EPROBE_DEFER;
 
-- 
2.49.1
Re: [PATCH 01/11] irqchip/bcm2712-mip: Fix OF node reference imbalance
Posted by Florian Fainelli 3 months, 3 weeks ago
On 10/13/25 02:46, Johan Hovold wrote:
> The init callback must not decrement the reference count of the provided
> irqchip OF node.
> 
> This should not cause any trouble currently, but if the driver ever
> starts probe deferring it could lead to warnings about reference
> underflow and saturation.
> 
> Fixes: 32c6c054661a ("irqchip: Add Broadcom BCM2712 MSI-X interrupt controller")
> Cc: Stanimir Varbanov <svarbanov@suse.de>
> Signed-off-by: Johan Hovold <johan@kernel.org>

Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
-- 
Florian
[tip: irq/drivers] irqchip/bcm2712-mip: Fix OF node reference imbalance
Posted by tip-bot2 for Johan Hovold 3 months, 3 weeks ago
The following commit has been merged into the irq/drivers branch of tip:

Commit-ID:     0435bcc4e5858c632c1b6d5afa637580d9779890
Gitweb:        https://git.kernel.org/tip/0435bcc4e5858c632c1b6d5afa637580d9779890
Author:        Johan Hovold <johan@kernel.org>
AuthorDate:    Mon, 13 Oct 2025 11:46:01 +02:00
Committer:     Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Thu, 16 Oct 2025 11:30:37 +02:00

irqchip/bcm2712-mip: Fix OF node reference imbalance

The init callback must not decrement the reference count of the provided
irqchip OF node.

This should not cause any trouble currently, but if the driver ever
starts probe deferring it could lead to warnings about reference
underflow and saturation.

Fixes: 32c6c054661a ("irqchip: Add Broadcom BCM2712 MSI-X interrupt controller")
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
---
 drivers/irqchip/irq-bcm2712-mip.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/irqchip/irq-bcm2712-mip.c b/drivers/irqchip/irq-bcm2712-mip.c
index 9bd7bc0..256c2d5 100644
--- a/drivers/irqchip/irq-bcm2712-mip.c
+++ b/drivers/irqchip/irq-bcm2712-mip.c
@@ -239,7 +239,6 @@ static int __init mip_of_msi_init(struct device_node *node, struct device_node *
 	int ret;
 
 	pdev = of_find_device_by_node(node);
-	of_node_put(node);
 	if (!pdev)
 		return -EPROBE_DEFER;