lkml.org 
[lkml]   [2022]   [Nov]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v4 2/2] clk: ti: dra7-atl: don't allocate `parent_names' variable
From
Date
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@amarulasolutions.com>
> Reported-by: kernel test robot <lkp@intel.com>
>
> ---

Applied to clk-next

\
 
 \ /
  Last update: 2022-11-23 02:04    [W:0.107 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site