irqchip/sifive-plic: One function call less in __plic_init() after error detection
Subsystems (4)
PATCH 1/1 irqchip/sifive-plic: One function call less in __plic_init() after error detection
From: Markus Elfring <[email protected]>
Date: Tue, 26 Dec 2023 21:34:47 +0100
The kfree() function was called in one case by the __plic_init() function during error handling
even if the passed data structure member contained a null pointer. This issue was detected by using the Coccinelle software.
Thus use an other label.
Signed-off-by Markus Elfring <[email protected]>
--- drivers/irqchip/irq-sifive-plic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/irqchip/irq-sifive-plic.c +1 -1
@@ -437,7 +437,7 @@ static int __init __plic_init(struct device_node *node, priv->prio_save =bitmap_alloc (nr_irqs,GFP_KERNEL );if (!priv->prio_save) - goto out_free_priority_reg; + goto out_iounmap; nr_contexts =of_irq_count (node);if (WARN_ON (!nr_contexts))
--
2.43.0