From: Sascha Hauer <s.hauer@pengutronix.de>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 5/7] regulator: of_regulator: remove unused allocation
Date: Tue, 21 May 2024 08:30:27 +0200 [thread overview]
Message-ID: <Zkw_g1dLzYhN5COk@pengutronix.de> (raw)
In-Reply-To: <20240517074824.767767-5-a.fatoum@pengutronix.de>
On Fri, May 17, 2024 at 09:48:22AM +0200, Ahmad Fatoum wrote:
> We leak this allocation, but we don't actually need it, so drop it.
>
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
> drivers/regulator/of_regulator.c | 6 ------
> 1 file changed, 6 deletions(-)
>
> diff --git a/drivers/regulator/of_regulator.c b/drivers/regulator/of_regulator.c
> index 10f75a4f1c60..c037f85c439d 100644
> --- a/drivers/regulator/of_regulator.c
> +++ b/drivers/regulator/of_regulator.c
> @@ -41,16 +41,10 @@ int of_regulator_match(struct device *dev, struct device_node *node,
> unsigned int i;
> const char *name;
> struct device_node *child;
> - struct devm_of_regulator_matches *devm_matches;
>
> if (!dev || !node)
> return -EINVAL;
>
> - devm_matches = xzalloc(sizeof(struct devm_of_regulator_matches));
> -
> - devm_matches->matches = matches;
> - devm_matches->num_matches = num_matches;
> -
Removed the definition of struct devm_of_regulator_matches along with
this patch.
Sascha
> for (i = 0; i < num_matches; i++) {
> struct of_regulator_match *match = &matches[i];
> match->of_node = NULL;
> --
> 2.39.2
>
>
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next prev parent reply other threads:[~2024-05-21 6:31 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-17 7:48 [PATCH 1/7] of: free unflattened overlays after application Ahmad Fatoum
2024-05-17 7:48 ` [PATCH 2/7] of: overlay: do not leak fixed up path Ahmad Fatoum
2024-05-17 7:48 ` [PATCH 3/7] test: self: digest: don't leak digest buffers Ahmad Fatoum
2024-05-17 7:48 ` [PATCH 4/7] test: self: ramfs: fix memory leak Ahmad Fatoum
2024-05-17 7:48 ` [PATCH 5/7] regulator: of_regulator: remove unused allocation Ahmad Fatoum
2024-05-21 6:30 ` Sascha Hauer [this message]
2024-05-17 7:48 ` [PATCH 6/7] globalvar: fix memory leak Ahmad Fatoum
2024-05-17 7:48 ` [PATCH 7/7] power: reset: reboot-mode: " Ahmad Fatoum
2024-05-21 6:29 ` [PATCH 1/7] of: free unflattened overlays after application Sascha Hauer
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=Zkw_g1dLzYhN5COk@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.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