[PATCH] rtc: at91sam9: fix OF node leak in probe() error path

Krzysztof Kozlowski posted 1 patch 1 year, 3 months ago
drivers/rtc/rtc-at91sam9.c | 1 +
1 file changed, 1 insertion(+)
[PATCH] rtc: at91sam9: fix OF node leak in probe() error path
Posted by Krzysztof Kozlowski 1 year, 3 months ago
Driver is leaking an OF node reference obtained from
of_parse_phandle_with_fixed_args().

Fixes: 43e112bb3dea ("rtc: at91sam9: make use of syscon/regmap to access GPBR registers")
Cc: <stable@vger.kernel.org>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 drivers/rtc/rtc-at91sam9.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/rtc/rtc-at91sam9.c b/drivers/rtc/rtc-at91sam9.c
index f93bee96e362..993c0878fb66 100644
--- a/drivers/rtc/rtc-at91sam9.c
+++ b/drivers/rtc/rtc-at91sam9.c
@@ -368,6 +368,7 @@ static int at91_rtc_probe(struct platform_device *pdev)
 		return ret;
 
 	rtc->gpbr = syscon_node_to_regmap(args.np);
+	of_node_put(args.np);
 	rtc->gpbr_offset = args.args[0];
 	if (IS_ERR(rtc->gpbr)) {
 		dev_err(&pdev->dev, "failed to retrieve gpbr regmap, aborting.\n");
-- 
2.43.0
Re: [PATCH] rtc: at91sam9: fix OF node leak in probe() error path
Posted by Alexandre Belloni 1 year, 3 months ago
On Sun, 25 Aug 2024 20:31:03 +0200, Krzysztof Kozlowski wrote:
> Driver is leaking an OF node reference obtained from
> of_parse_phandle_with_fixed_args().
> 
> 

Applied, thanks!

[1/1] rtc: at91sam9: fix OF node leak in probe() error path
      https://git.kernel.org/abelloni/c/988d7f3571e8

Best regards,

-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Re: [PATCH] rtc: at91sam9: fix OF node leak in probe() error path
Posted by Markus Elfring 1 year, 3 months ago
> Driver is leaking an OF node reference obtained from
> of_parse_phandle_with_fixed_args().

Is there a need to improve such a change description another bit?

+ Imperative mood

+ Tags like “Fixes” and “Cc”


Regards,
Markus
Re: [PATCH] rtc: at91sam9: fix OF node leak in probe() error path
Posted by Krzysztof Kozlowski 1 year, 3 months ago
On 25/08/2024 21:35, Markus Elfring wrote:
>> Driver is leaking an OF node reference obtained from
>> of_parse_phandle_with_fixed_args().
> 
> Is there a need to improve such a change description another bit?
> 
> + Imperative mood

I have enough of your stupid emails.

Commit msg is fine.

> 
> + Tags like “Fixes” and “Cc”

Read the patch.

PLONK.

Best regards,
Krzysztof

Re: rtc: at91sam9: fix OF node leak in probe() error path
Posted by Markus Elfring 1 year, 3 months ago
>>> Driver is leaking an OF node reference obtained from
>>> of_parse_phandle_with_fixed_args().
>>
>> Is there a need to improve such a change description another bit?
>>
>> + Imperative mood
…
> Commit msg is fine.
…
>> + Tags like “Fixes” and “Cc”
>
> Read the patch.

What does hinder you to take requirements from a known information source
better into account?
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.11-rc5#n94

Regards,
Markus
Re: rtc: at91sam9: fix OF node leak in probe() error path
Posted by Greg KH 1 year, 3 months ago
On Mon, Aug 26, 2024 at 09:12:32AM +0200, Markus Elfring wrote:
> >>> Driver is leaking an OF node reference obtained from
> >>> of_parse_phandle_with_fixed_args().
> >>
> >> Is there a need to improve such a change description another bit?
> >>
> >> + Imperative mood
> …
> > Commit msg is fine.
> …
> >> + Tags like “Fixes” and “Cc”
> >
> > Read the patch.
> 
> What does hinder you to take requirements from a known information source
> better into account?
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.11-rc5#n94
> 
> Regards,
> Markus
> 

Hi,

This is the semi-friendly patch-bot of Greg Kroah-Hartman.

Markus, you seem to have sent a nonsensical or otherwise pointless
review comment to a patch submission on a Linux kernel developer mailing
list.  I strongly suggest that you not do this anymore.  Please do not
bother developers who are actively working to produce patches and
features with comments that, in the end, are a waste of time.

Patch submitter, please ignore Markus's suggestion; you do not need to
follow it at all.  The person/bot/AI that sent it is being ignored by
almost all Linux kernel maintainers for having a persistent pattern of
behavior of producing distracting and pointless commentary, and
inability to adapt to feedback.  Please feel free to also ignore emails
from them.

thanks,

greg k-h's patch email bot