mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Patrice CHOTARD <patrice.chotard@foss.st.com>
To: Krzysztof Kozlowski <krzk@kernel.org>,
	Rob Herring <robh@kernel.org>, Conor Dooley <conor+dt@kernel.org>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Alexandre Torgue <alexandre.torgue@foss.st.com>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>
Cc: <christophe.kerello@foss.st.com>, <linux-kernel@vger.kernel.org>,
	<devicetree@vger.kernel.org>,
	<linux-stm32@st-md-mailman.stormreply.com>,
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v9 2/3] memory: Add STM32 Octo Memory Manager driver
Date: Tue, 22 Apr 2025 10:37:03 +0200	[thread overview]
Message-ID: <2bdbee00-07d2-4f6d-830a-1e5e6982d5a6@foss.st.com> (raw)
In-Reply-To: <3dd741ef-4589-49cd-967f-8a2d72e75cf4@kernel.org>



On 4/15/25 08:00, Krzysztof Kozlowski wrote:
> On 10/04/2025 11:27, Patrice Chotard wrote:
>> +	for (i = 0; i < omm->nb_child; i++) {
>> +		idx = of_property_match_string(dev->of_node,
>> +					       "memory-region-names",
>> +					       mm_name[i]);
>> +		if (idx < 0)
>> +			continue;
>> +
>> +		/* res1 only used on second loop iteration */
>> +		res1.start = res.start;
>> +		res1.end = res.end;
>> +
>> +		node = of_parse_phandle(dev->of_node, "memory-region", idx);
>> +		if (!node)
>> +			continue;
>> +
>> +		ret = of_address_to_resource(node, 0, &res);
>> +		if (ret) {
>> +			of_node_put(node);
>> +			dev_err(dev, "unable to resolve memory region\n");
>> +			return ret;
>> +		}
>> +
>> +		/* check that memory region fits inside OMM memory map area */
>> +		if (!resource_contains(omm->mm_res, &res)) {
>> +			dev_err(dev, "%s doesn't fit inside OMM memory map area\n",
>> +				mm_name[i]);
>> +			dev_err(dev, "%pR doesn't fit inside %pR\n", &res, omm->mm_res);
>> +
> 
> I don't understand. I already pointed out that you leak OF reference.
> You fixed it in one place, ignoring all the rest. You must fix it
> everywhere.
> 

Hi Krzysztof

My bad, i will add all missing of_node_put().

Thanks
Patrice

>> +			return -EFAULT;
>> +		}
>> +
> 
> 
> Best regards,
> Krzysztof

  reply	other threads:[~2025-04-22  8:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-10  9:27 [PATCH v9 0/3] Add STM32MP25 SPI NOR support Patrice Chotard
2025-04-10  9:27 ` [PATCH v9 1/3] dt-bindings: memory-controllers: Add STM32 Octo Memory Manager controller Patrice Chotard
2025-04-11 17:09   ` Rob Herring (Arm)
2025-04-10  9:27 ` [PATCH v9 2/3] memory: Add STM32 Octo Memory Manager driver Patrice Chotard
2025-04-15  6:00   ` Krzysztof Kozlowski
2025-04-22  8:37     ` Patrice CHOTARD [this message]
2025-04-10  9:27 ` [PATCH v9 3/3] MAINTAINERS: add entry for STM32 OCTO MEMORY MANAGER driver Patrice Chotard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2bdbee00-07d2-4f6d-830a-1e5e6982d5a6@foss.st.com \
    --to=patrice.chotard@foss.st.com \
    --cc=alexandre.torgue@foss.st.com \
    --cc=catalin.marinas@arm.com \
    --cc=christophe.kerello@foss.st.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=krzk@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=p.zabel@pengutronix.de \
    --cc=robh@kernel.org \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®