[lvc-project] [PATCH] ASoC: cs35l36: Handle zero sysclk frequency

Charles Keepax ckeepax at opensource.cirrus.com
Mon Nov 2 13:28:22 MSK 2026


On Fri, Oct 30, 2026 at 06:26:36PM +0400, Alex Kazinsky wrote:
> simple_util_shutdown() calls snd_soc_dai_set_sysclk() with a zero
> frequency when mclk-fs is configured, the clock is not fixed and the
> last active stream on the DAI is closed.
> 
> cs35l36_dai_set_sysclk() passes this frequency to DIV_ROUND_UP() when
> calculating the FS monitor windows, resulting in division by zero.
> 
> Return success without updating the FS monitor windows when the
> frequency is zero, as there is no running clock to monitor.
> 
> Found by Linux Verification Center (linuxtesting.org) with SVACE
> static analysis tool.
> 
> Fixes: 6ba9dd6c893b ("ASoC: cs35l36: Add support for Cirrus CS35L36 Amplifier")
> Cc: stable at vger.kernel.org
> Signed-off-by: Alex Kazinsky <a.kazinsky at ideco.ru>
> ---

Reviewed-by: Charles Keepax <ckeepax at opensource.cirrus.com>

Thanks,
Charles



More information about the lvc-project mailing list