[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211109055958.130287-1-ye.guojin@zte.com.cn>
Date: Tue, 9 Nov 2021 05:59:58 +0000
From: cgel.zte@...il.com
To: f.fainelli@...il.com
Cc: bcm-kernel-feedback-list@...adcom.com, cgel.zte@...il.com,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-mips@...r.kernel.org, maz@...nel.org, tglx@...utronix.de,
ye.guojin@....com.cn, zealci@....com.cn
Subject: [PATCH v2] irqchip/irq-bcm7120-l2: add put_device() after of_find_device_by_node()
From: Ye Guojin <ye.guojin@....com.cn>
This was found by coccicheck:
./drivers/irqchip/irq-bcm7120-l2.c,328,1-7,ERROR missing put_device;
call of_find_device_by_node on line 234, but without a corresponding
object release within this function.
./drivers/irqchip/irq-bcm7120-l2.c,341,1-7,ERROR missing put_device;
call of_find_device_by_node on line 234, but without a corresponding
object release within this function.
Reported-by: Zeal Robot <zealci@....com.cn>
Signed-off-by: Ye Guojin <ye.guojin@....com.cn>
---
v2:
- Restore the code at line 329.
- Do put_device() when we stop making use of the platform_device, which
is at line 241.
---
drivers/irqchip/irq-bcm7120-l2.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/irqchip/irq-bcm7120-l2.c b/drivers/irqchip/irq-bcm7120-l2.c
index d80e67a6aad2..bb6609cebdbc 100644
--- a/drivers/irqchip/irq-bcm7120-l2.c
+++ b/drivers/irqchip/irq-bcm7120-l2.c
@@ -238,6 +238,7 @@ static int __init bcm7120_l2_intc_probe(struct device_node *dn,
}
data->num_parent_irqs = platform_irq_count(pdev);
+ put_device(&pdev->dev);
if (data->num_parent_irqs <= 0) {
pr_err("invalid number of parent interrupts\n");
ret = -ENOMEM;
--
2.25.1
Powered by blists - more mailing lists