Re: [PATCH v4 2/2] clk: ti: dra7-atl: don't allocate `parent_names' variable

From: Stephen Boyd
Date: Tue Nov 22 2022 - 20:02:59 EST


Quoting Dario Binacchi (2022-11-13 10:11:47)
> The `parent_names' variable was freed also in case of kzalloc() error.
> Instead of modifying the code to perform a proper memory release, I
> decided to fix the bug by not allocating memory.
> Since only one parent name is referenced, it is not necessary to
> allocate this variable at runtime and therefore you can avoid calling
> the kzalloc() function. This simplifies the code (even calls to kfree
> can be removed) and improves the performance of the routine.
>
> Signed-off-by: Dario Binacchi <dario.binacchi@xxxxxxxxxxxxxxxxxxxx>
> Reported-by: kernel test robot <lkp@xxxxxxxxx>
>
> ---

Applied to clk-next