[PATCH v3 2/4] pinctrl: bcm2835: Remove of_node_put() in bcm2835_of_gpio_ranges_fallback()

Andy Shevchenko posted 4 patches 2 years, 8 months ago
[PATCH v3 2/4] pinctrl: bcm2835: Remove of_node_put() in bcm2835_of_gpio_ranges_fallback()
Posted by Andy Shevchenko 2 years, 8 months ago
Remove wrong of_node_put() in bcm2835_of_gpio_ranges_fallback(),
there is no counterpart of_node_get() for it.

Fixes: d2b67744fd99 ("pinctrl: bcm2835: implement hook for missing gpio-ranges")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/pinctrl/bcm/pinctrl-bcm2835.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/pinctrl/bcm/pinctrl-bcm2835.c b/drivers/pinctrl/bcm/pinctrl-bcm2835.c
index 7857e612a100..c7cdccdb4332 100644
--- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c
+++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c
@@ -363,8 +363,6 @@ static int bcm2835_of_gpio_ranges_fallback(struct gpio_chip *gc,
 {
 	struct pinctrl_dev *pctldev = of_pinctrl_get(np);
 
-	of_node_put(np);
-
 	if (!pctldev)
 		return 0;
 
-- 
2.39.0
Re: [PATCH v3 2/4] pinctrl: bcm2835: Remove of_node_put() in bcm2835_of_gpio_ranges_fallback()
Posted by Stefan Wahren 2 years, 8 months ago
Hi Andy,

Am 13.01.23 um 22:53 schrieb Andy Shevchenko:
> Remove wrong of_node_put() in bcm2835_of_gpio_ranges_fallback(),
> there is no counterpart of_node_get() for it.
>
> Fixes: d2b67744fd99 ("pinctrl: bcm2835: implement hook for missing gpio-ranges")
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

thanks for fixing. It seems that i got confused by function name and 
usage in other driver.

Reviewed-by: Stefan Wahren <stefan.wahren@i2se.com>

> ---
>   drivers/pinctrl/bcm/pinctrl-bcm2835.c | 2 --
>   1 file changed, 2 deletions(-)
>
> diff --git a/drivers/pinctrl/bcm/pinctrl-bcm2835.c b/drivers/pinctrl/bcm/pinctrl-bcm2835.c
> index 7857e612a100..c7cdccdb4332 100644
> --- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c
> +++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c
> @@ -363,8 +363,6 @@ static int bcm2835_of_gpio_ranges_fallback(struct gpio_chip *gc,
>   {
>   	struct pinctrl_dev *pctldev = of_pinctrl_get(np);
>   
> -	of_node_put(np);
> -
>   	if (!pctldev)
>   		return 0;
>
Re: [PATCH v3 2/4] pinctrl: bcm2835: Remove of_node_put() in bcm2835_of_gpio_ranges_fallback()
Posted by Andy Shevchenko 2 years, 8 months ago
On Sat, Jan 14, 2023 at 12:03:07PM +0100, Stefan Wahren wrote:
> Am 13.01.23 um 22:53 schrieb Andy Shevchenko:
> > Remove wrong of_node_put() in bcm2835_of_gpio_ranges_fallback(),
> > there is no counterpart of_node_get() for it.
> > 
> > Fixes: d2b67744fd99 ("pinctrl: bcm2835: implement hook for missing gpio-ranges")
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> 
> thanks for fixing. It seems that i got confused by function name and usage
> in other driver.

You're welcome! Would be nice if you or somebody else have a chance to test
the series.

> Reviewed-by: Stefan Wahren <stefan.wahren@i2se.com>

Thank you!

-- 
With Best Regards,
Andy Shevchenko
Re: [PATCH v3 2/4] pinctrl: bcm2835: Remove of_node_put() in bcm2835_of_gpio_ranges_fallback()
Posted by Florian Fainelli 2 years, 8 months ago

On 1/14/2023 3:10 AM, Andy Shevchenko wrote:
> On Sat, Jan 14, 2023 at 12:03:07PM +0100, Stefan Wahren wrote:
>> Am 13.01.23 um 22:53 schrieb Andy Shevchenko:
>>> Remove wrong of_node_put() in bcm2835_of_gpio_ranges_fallback(),
>>> there is no counterpart of_node_get() for it.
>>>
>>> Fixes: d2b67744fd99 ("pinctrl: bcm2835: implement hook for missing gpio-ranges")
>>> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
>>
>> thanks for fixing. It seems that i got confused by function name and usage
>> in other driver.
> 
> You're welcome! Would be nice if you or somebody else have a chance to test
> the series.

Yes I should be able to do that in the next few days.
-- 
Florian