lkml.org 
[lkml]   [2021]   [Dec]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[irqchip: irq/irqchip-fixes] irqchip/irq-bcm7120-l2: Add put_device() after of_find_device_by_node()
The following commit has been merged into the irq/irqchip-fixes branch of irqchip:

Commit-ID: c3fbab7767c53397d7b849799474f5a27cf306e6
Gitweb: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/c3fbab7767c53397d7b849799474f5a27cf306e6
Author: Ye Guojin <ye.guojin@zte.com.cn>
AuthorDate: Tue, 09 Nov 2021 05:59:58
Committer: Marc Zyngier <maz@kernel.org>
CommitterDate: Fri, 10 Dec 2021 13:23:13

irqchip/irq-bcm7120-l2: Add put_device() after of_find_device_by_node()

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@zte.com.cn>
Signed-off-by: Ye Guojin <ye.guojin@zte.com.cn>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20211109055958.130287-1-ye.guojin@zte.com.cn
---
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 d80e67a..bb6609c 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;
\
 
 \ /
  Last update: 2021-12-10 14:26    [W:0.344 / U:0.720 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site