From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Jonathan Cameron <jic23@kernel.org>
Cc: Dan Robertson <dan@dlrobertson.com>,
Lars-Peter Clausen <lars@metafoo.de>,
Michael Hennerich <Michael.Hennerich@analog.com>,
Nicolas Ferre <nicolas.ferre@microchip.com>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
Claudiu Beznea <claudiu.beznea@tuxon.dev>,
Oleksij Rempel <o.rempel@pengutronix.de>,
kernel@pengutronix.de, linux-iio@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
Sean Nyekjaer <sean@geanix.com>
Subject: Re: [PATCH 6/6] iio: adc: ad5755: drop redundant devm_kfree()
Date: Sun, 7 Jul 2024 13:34:14 +0200 [thread overview]
Message-ID: <656f7294-7d69-4f4f-95c9-477ee507ca79@linaro.org> (raw)
In-Reply-To: <20240706115229.47b8d7fa@jic23-huawei>
On 06/07/2024 12:52, Jonathan Cameron wrote:
> On Fri, 05 Jul 2024 12:40:49 +0200
> Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote:
>
>> The driver calls ad5755_parse_fw() only from probe() function, so
>> devm_kfree() during error path is not necessary and only makes code
>> weirder.
>>
>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>
> The path this is in doesn't result in the driver failing to probe as it
> falls back to a const default structure.
> So whilst it's not a 'bug' to remove this free, we are removing data the driver
> is not going to use - so to my eye at least this is a deliberate design
> decision.
Ah, I missed that part - just looked at !pdata in the probe.
>
> Mind you it's not a particularly big allocation so maybe worth not cleaning
> up until driver remove in order to save on complexity.
>
> Sean, your code I think. Do you care either way?
I think the code was correct and my patch can be abandoned.
Best regards,
Krzysztof
next prev parent reply other threads:[~2024-07-07 11:34 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-05 10:40 [PATCH 0/6] iio: adc: simplify with cleanup.h Krzysztof Kozlowski
2024-07-05 10:40 ` [PATCH 1/6] iio: accel: bma400: " Krzysztof Kozlowski
2024-07-05 10:40 ` [PATCH 2/6] iio: adc: ad7280a: " Krzysztof Kozlowski
2024-07-05 11:43 ` Nuno Sá
2024-07-05 10:40 ` [PATCH 3/6] iio: adc: at91: " Krzysztof Kozlowski
2024-07-05 10:40 ` [PATCH 4/6] iio: adc: max1363: " Krzysztof Kozlowski
2024-07-05 11:45 ` Nuno Sá
2024-07-05 10:40 ` [PATCH 5/6] iio: adc: ti-tsc2046: " Krzysztof Kozlowski
2024-07-06 5:08 ` Oleksij Rempel
2024-07-05 10:40 ` [PATCH 6/6] iio: adc: ad5755: drop redundant devm_kfree() Krzysztof Kozlowski
2024-07-05 11:47 ` Nuno Sá
2024-07-06 10:52 ` Jonathan Cameron
2024-07-07 11:34 ` Krzysztof Kozlowski [this message]
2024-07-06 10:55 ` [PATCH 0/6] iio: adc: simplify with cleanup.h Jonathan Cameron
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=656f7294-7d69-4f4f-95c9-477ee507ca79@linaro.org \
--to=krzysztof.kozlowski@linaro.org \
--cc=Michael.Hennerich@analog.com \
--cc=alexandre.belloni@bootlin.com \
--cc=claudiu.beznea@tuxon.dev \
--cc=dan@dlrobertson.com \
--cc=jic23@kernel.org \
--cc=kernel@pengutronix.de \
--cc=lars@metafoo.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nicolas.ferre@microchip.com \
--cc=o.rempel@pengutronix.de \
--cc=sean@geanix.com \
/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®