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.fat...@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 |

Reply via email to