Loading
ASoC: stm32: sai: fix OF node leak on probe
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: 5914d285 ("ASoC: stm32: sai: Add synchronization support") Fixes: d4180b4c ("ASoC: stm32: sai: fix set_sync service") Cc: Olivier Moysan <olivier.moysan@st.com> Cc: stable@vger.kernel.org # 4.16: d4180b4c 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>