diff options
author | Luo Yifan <luoyifan@cmss.chinamobile.com> | 2024-11-07 04:59:36 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2024-11-07 16:07:17 +0300 |
commit | 23569c8b314925bdb70dd1a7b63cfe6100868315 (patch) | |
tree | 63f4de30ae4aeac34558c1acd924bbb874692e2e /tools/perf/scripts/python/parallel-perf.py | |
parent | 63c1c87993e0e5bb11bced3d8224446a2bc62338 (diff) | |
download | linux-23569c8b314925bdb70dd1a7b63cfe6100868315.tar.xz |
ASoC: stm: Prevent potential division by zero in stm32_sai_get_clk_div()
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>
Diffstat (limited to 'tools/perf/scripts/python/parallel-perf.py')
0 files changed, 0 insertions, 0 deletions