Files
linux-bredos/sound/soc/stm
Luo Yifan 0058f8ebfd ASoC: stm: Prevent potential division by zero in stm32_sai_get_clk_div()
[ Upstream commit 23569c8b31 ]

This patch checks if div is less than or equal to zero (div <= 0). If
div is zero or negative, the function returns -EINVAL, ensuring the
division operation is safe to perform.

Signed-off-by: Luo Yifan <luoyifan@cmss.chinamobile.com>
Reviewed-by: Olivier Moysan <olivier.moysan@foss.st.com>
Link: https://patch.msgid.link/20241107015936.211902-1-luoyifan@cmss.chinamobile.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-12-09 10:31:39 +01:00
..
2018-01-10 10:52:05 +00:00
2019-06-26 12:39:34 +01:00