linux/drivers/soc/ti
Wentao Liang b7db9953c2 soc: ti: pruss: Fix double free in pruss_clk_mux_setup()
[ Upstream commit 80db65d4ac ]

In the pruss_clk_mux_setup(), the devm_add_action_or_reset() indirectly
calls pruss_of_free_clk_provider(), which calls of_node_put(clk_mux_np)
on the error path. However, after the devm_add_action_or_reset()
returns, the of_node_put(clk_mux_np) is called again, causing a double
free.

Fix by returning directly, to avoid the duplicate of_node_put().

Fixes: ba59c9b43c ("soc: ti: pruss: support CORECLK_MUX and IEPCLK_MUX")
Cc: stable@vger.kernel.org
Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
Link: https://patch.msgid.link/20260113014716.2464741-1-vulab@iscas.ac.cn
Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2026-03-04 07:21:05 -05:00
..
k3-ringacc.c soc: ti: k3-ringacc: Use device_match_of_node() 2025-04-18 10:36:39 -05:00
k3-socinfo.c soc: ti: k3-socinfo: Fix regmap leak on probe failure 2026-03-04 07:21:05 -05:00
Kconfig pmdomain: ti: Move and add Kconfig options to the pmdomain subsystem 2023-10-04 23:41:56 +02:00
knav_dma.c net: ethernet: ti: netcp: Standardize knav_dma_open_channel to return NULL on error 2025-11-04 19:15:36 -08:00
knav_qmss.h soc: ti: knav_qmss: Constify struct knav_range_ops 2024-06-27 17:45:28 -05:00
knav_qmss_acc.c soc: ti: knav_qmss: Constify struct knav_range_ops 2024-06-27 17:45:28 -05:00
knav_qmss_queue.c soc: ti: knav_qmss_queue: Remove unnecessary NULL check before free_percpu() 2025-04-18 10:36:45 -05:00
Makefile soc: ti: Mover power-domain drivers to the genpd dir 2023-07-14 10:40:56 +02:00
pm33xx.c arm: Handle KCOV __init vs inline mismatches 2025-07-21 21:43:39 -07:00
pruss.c soc: ti: pruss: Fix double free in pruss_clk_mux_setup() 2026-03-04 07:21:05 -05:00
pruss.h soc: ti: pruss: Add pruss_cfg_read()/update(), pruss_cfg_get_gpmux()/set_gpmux() APIs 2023-05-17 09:15:39 -05:00
smartreflex.c soc: ti: driver updates for v6.13 2024-11-04 22:49:44 +01:00
ti_sci_inta_msi.c soc: ti: ti_sci_inta_msi: Switch MSI descriptor locking to guard() 2025-04-09 20:47:29 +02:00
wkup_m3_ipc.c soc: ti: wkup_m3_ipc: Use dev_err_probe 2025-05-09 06:34:27 -05:00