Patch "gpio: sifive: Fix refcount leak in sifive_gpio_probe" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    gpio: sifive: Fix refcount leak in sifive_gpio_probe

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     gpio-sifive-fix-refcount-leak-in-sifive_gpio_probe.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 2c9bd3bc094387ab4afb5e0f65b2e2f4c820137a
Author: Miaoqian Lin <linmq006@xxxxxxxxx>
Date:   Mon Jan 2 12:20:39 2023 +0400

    gpio: sifive: Fix refcount leak in sifive_gpio_probe
    
    [ Upstream commit 694175cd8a1643cde3acb45c9294bca44a8e08e9 ]
    
    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: 96868dce644d ("gpio/sifive: Add GPIO driver for SiFive SoCs")
    Signed-off-by: Miaoqian Lin <linmq006@xxxxxxxxx>
    Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpio/gpio-sifive.c b/drivers/gpio/gpio-sifive.c
index 4f28fa73450c..a42ffb9f3057 100644
--- a/drivers/gpio/gpio-sifive.c
+++ b/drivers/gpio/gpio-sifive.c
@@ -195,6 +195,7 @@ static int sifive_gpio_probe(struct platform_device *pdev)
 		return -ENODEV;
 	}
 	parent = irq_find_host(irq_parent);
+	of_node_put(irq_parent);
 	if (!parent) {
 		dev_err(dev, "no IRQ parent domain\n");
 		return -ENODEV;



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux