Since this is targeted at all BSPs, we should indicate if the
patch is a backport/cherry-pick or if it has also been submitted
upstream.

Bruce

In message: [linux-yocto][PATCH v5.10/standard/base 1/1] gpio: gpio-altera: Add 
missing of_node_put() in altera_gpio_probe
on 18/01/2024 Haitao Liu wrote:

> Fix following error:
> 
> OF: ERROR: memory leak, expected refcount 1 instead of 2,
>     of_node_get()/of_node_put() unbalanced - destroy cset entry: attach
>     overlay node /soc/gpio@df020180
> 
> After finishing using device node got from of_mm_gpiochip_add_data(),
> of_node_put() needs to be called. The refcount would be incremented in
> of_mm_gpiochip_add_data.
> 
> Fixes: 5d07a692f9562 (gpio: gpiolib-of: Fix refcount bugs in 
> of_mm_gpiochip_add_data())
> 
> Signed-off-by: Haitao Liu <[email protected]>
> ---
>  drivers/gpio/gpio-altera.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpio/gpio-altera.c b/drivers/gpio/gpio-altera.c
> index b7932ecc3b61..b78b05a18e61 100644
> --- a/drivers/gpio/gpio-altera.c
> +++ b/drivers/gpio/gpio-altera.c
> @@ -308,6 +308,8 @@ static int altera_gpio_probe(struct platform_device *pdev)
>               return ret;
>       }
>  
> +     of_node_put(node);
> +
>       platform_set_drvdata(pdev, altera_gc);
>  
>       return 0;
> -- 
> 2.25.1
> 
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#13501): 
https://lists.yoctoproject.org/g/linux-yocto/message/13501
Mute This Topic: https://lists.yoctoproject.org/mt/103804025/21656
Group Owner: [email protected]
Unsubscribe: 
https://lists.yoctoproject.org/g/linux-yocto/leave/6687884/21656/624485779/xyzzy
 [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to