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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux