linux/drivers/soc/ti
Wentao Liang 69aa67c1e2 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:44 -05:00
..
k3-ringacc.c soc: Switch back to struct platform_driver::remove() 2025-12-18 13:54:46 +01:00
k3-socinfo.c soc: ti: k3-socinfo: Fix regmap leak on probe failure 2026-03-04 07:21:44 -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 soc: Switch back to struct platform_driver::remove() 2025-12-18 13:54:46 +01: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: Switch back to struct platform_driver::remove() 2025-12-18 13:54:46 +01:00
Makefile soc: ti: Mover power-domain drivers to the genpd dir 2023-07-14 10:40:56 +02:00
pm33xx.c soc: Switch back to struct platform_driver::remove() 2025-12-18 13:54:46 +01:00
pruss.c soc: ti: pruss: Fix double free in pruss_clk_mux_setup() 2026-03-04 07:21:44 -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: Switch back to struct platform_driver::remove() 2025-12-18 13:54:46 +01:00
ti_sci_inta_msi.c soc: ti: Explicitly include correct DT includes 2023-07-25 06:26:34 -05:00
wkup_m3_ipc.c soc: Switch back to struct platform_driver::remove() 2025-12-18 13:54:46 +01:00