linux/drivers/clk/ti
Dario Binacchi 6e49aacaaf clk: ti: dra7-atl: don't allocate `parent_names' variable
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>
Link: https://lore.kernel.org/r/20221113181147.1626585-2-dario.binacchi@amarulasolutions.com
Tested-by: Tony Lindgren <tony@atomide.com>
Reviewed-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2022-11-22 17:02:03 -08:00
..
adpll.c treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_30.RULE (part 1) 2022-06-10 14:51:35 +02:00
apll.c clk: ti: change ti_clk_register[_omap_hw]() API 2022-11-22 17:01:47 -08:00
autoidle.c treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_320.RULE 2022-06-10 14:51:36 +02:00
clk-2xxx.c treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_30.RULE (part 1) 2022-06-10 14:51:35 +02:00
clk-3xxx.c treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_30.RULE (part 1) 2022-06-10 14:51:35 +02:00
clk-7xx.c clk: ti: Drop legacy compatibility clocks for dra7 2022-03-15 14:07:27 -07:00
clk-33xx.c treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_30.RULE (part 1) 2022-06-10 14:51:35 +02:00
clk-43xx.c treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_30.RULE (part 1) 2022-06-10 14:51:35 +02:00
clk-44xx.c clk: ti: Stop using legacy clkctrl names for omap4 and 5 2022-06-16 00:49:57 -07:00
clk-54xx.c clk: ti: Stop using legacy clkctrl names for omap4 and 5 2022-06-16 00:49:57 -07:00
clk-814x.c clk: ti: Fix dm814x clkctrl for ethernet 2020-03-17 09:45:24 -07:00
clk-816x.c treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_30.RULE (part 1) 2022-06-10 14:51:35 +02:00
clk-dra7-atl.c clk: ti: dra7-atl: don't allocate `parent_names' variable 2022-11-22 17:02:03 -08:00
clk.c clk: ti: change ti_clk_register[_omap_hw]() API 2022-11-22 17:01:47 -08:00
clkctrl.c clk: ti: change ti_clk_register[_omap_hw]() API 2022-11-22 17:01:47 -08:00
clkt_dflt.c treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_320.RULE 2022-06-10 14:51:36 +02:00
clkt_dpll.c clk: ti: clkt_dpll: Fix some kernel-doc misdemeanours 2021-02-10 19:42:41 -08:00
clkt_iclk.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
clock.h clk: ti: change ti_clk_register[_omap_hw]() API 2022-11-22 17:01:47 -08:00
clockdomain.c treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_320.RULE 2022-06-10 14:51:36 +02:00
composite.c clk: ti: change ti_clk_register[_omap_hw]() API 2022-11-22 17:01:47 -08:00
divider.c clk: ti: change ti_clk_register[_omap_hw]() API 2022-11-22 17:01:47 -08:00
dpll3xxx.c clk: ti: add am33xx/am43xx spread spectrum clock support 2021-06-08 17:49:16 -07:00
dpll44xx.c clk: ti: dpll44xx: Fix some potential doc-rot 2021-02-11 11:56:05 -08:00
dpll.c clk: ti: change ti_clk_register[_omap_hw]() API 2022-11-22 17:01:47 -08:00
fapll.c treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_30.RULE (part 1) 2022-06-10 14:51:35 +02:00
fixed-factor.c clk: ti: change ti_clk_register[_omap_hw]() API 2022-11-22 17:01:47 -08:00
gate.c clk: ti: change ti_clk_register[_omap_hw]() API 2022-11-22 17:01:47 -08:00
interface.c clk: ti: change ti_clk_register[_omap_hw]() API 2022-11-22 17:01:47 -08:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile clk: ti: Drop legacy compatibility clocks for dra7 2022-03-15 14:07:27 -07:00
mux.c clk: ti: change ti_clk_register[_omap_hw]() API 2022-11-22 17:01:47 -08:00