diff mbox series

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

Message ID 20240825183103.102904-1-krzysztof.kozlowski@linaro.org (mailing list archive)
State New, archived
Headers show
Series rtc: at91sam9: fix OF node leak in probe() error path | expand

Commit Message

Krzysztof Kozlowski Aug. 25, 2024, 6:31 p.m. UTC
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(+)

Comments

Markus Elfring Aug. 25, 2024, 7:35 p.m. UTC | #1
> 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
Krzysztof Kozlowski Aug. 26, 2024, 6:59 a.m. UTC | #2
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
Markus Elfring Aug. 26, 2024, 7:12 a.m. UTC | #3
>>> 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
Greg KH Aug. 26, 2024, 7:30 a.m. UTC | #4
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
Alexandre Belloni Sept. 11, 2024, 10:30 p.m. UTC | #5
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,
diff mbox series

Patch

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");