Patch "gpio/rockchip: fix refcount leak in rockchip_gpiolib_register()" has been added to the 6.0-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/rockchip: fix refcount leak in rockchip_gpiolib_register()

to the 6.0-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-rockchip-fix-refcount-leak-in-rockchip_gpiolib_.patch
and it can be found in the queue-6.0 subdirectory.

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



commit 5270aabe9a7fd868301ee804560341d741bf27aa
Author: Wang Yufen <wangyufen@xxxxxxxxxx>
Date:   Mon Dec 5 14:19:56 2022 +0800

    gpio/rockchip: fix refcount leak in rockchip_gpiolib_register()
    
    [ Upstream commit 63ff545af73f759d1bd04198af8ed8577fb739fc ]
    
    The node returned by of_get_parent() with refcount incremented,
    of_node_put() needs be called when finish using it. So add it in the
    end of of_pinctrl_get().
    
    Fixes: 936ee2675eee ("gpio/rockchip: add driver for rockchip gpio")
    Signed-off-by: Wang Yufen <wangyufen@xxxxxxxxxx>
    Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpio/gpio-rockchip.c b/drivers/gpio/gpio-rockchip.c
index 9c976ad7208e..09cfb49ed998 100644
--- a/drivers/gpio/gpio-rockchip.c
+++ b/drivers/gpio/gpio-rockchip.c
@@ -621,6 +621,7 @@ static int rockchip_gpiolib_register(struct rockchip_pin_bank *bank)
 			return -ENODATA;
 
 		pctldev = of_pinctrl_get(pctlnp);
+		of_node_put(pctlnp);
 		if (!pctldev)
 			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