linux/sound/soc/stm
Johan Hovold 3752afcc6d ASoC: stm32: sai: fix OF node leak on probe
commit 23261f0de0 upstream.

The reference taken to the sync provider OF node when probing the
platform device is currently only dropped if the set_sync() callback
fails during DAI probe.

Make sure to drop the reference on platform probe failures (e.g. probe
deferral) and on driver unbind.

This also avoids a potential use-after-free in case the DAI is ever
reprobed without first rebinding the platform driver.

Fixes: 5914d285f6 ("ASoC: stm32: sai: Add synchronization support")
Fixes: d4180b4c02 ("ASoC: stm32: sai: fix set_sync service")
Cc: Olivier Moysan <olivier.moysan@st.com>
Cc: stable@vger.kernel.org      # 4.16: d4180b4c02
Signed-off-by: Johan Hovold <johan@kernel.org>
Reviewed-by: olivier moysan <olivier.moysan@foss.st.com>
Link: https://patch.msgid.link/20251124104908.15754-4-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2026-01-08 10:16:53 +01:00
..
Kconfig ASoC: stm: Standardize ASoC menu 2025-06-24 01:01:17 +01:00
Makefile ASoC: stm: Use *-y instead of *-objs in Makefile 2024-05-08 11:39:34 +09:00
stm32_adfsdm.c ASoC: stm32: dfsdm: change rate upper limits 2024-11-14 11:42:42 +00:00
stm32_i2s.c ASoC: stm: stm32_i2s: Fix calc_clk_div() error handling in determine_rate() 2025-08-12 21:15:29 +01:00
stm32_sai.c ASoC: stm32: sai: fix OF node leak on probe 2026-01-08 10:16:53 +01:00
stm32_sai.h ASoC: stm32: sai: add stm32mp25 support 2024-11-08 13:32:45 +00:00
stm32_sai_sub.c ASoC: stm32: sai: fix OF node leak on probe 2026-01-08 10:16:53 +01:00
stm32_spdifrx.c ASoC: stm: Convert to SYSTEM_SLEEP_PM_OPS() 2025-03-17 10:14:58 +00:00