diff options
| author | Jihed Chaibi <jihed.chaibi.dev@gmail.com> | 2026-03-24 22:09:09 +0100 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-03-30 19:38:22 +0100 |
| commit | 622363757b2286dd2c2984b0d80255cbb35a0495 (patch) | |
| tree | fff964787486f04720a6dcd66e7b3bbe09b57a57 /fs/devfs/git@git.tavy.me:linux.git | |
| parent | b9eff9732cb0f86a68c9d1592a98ceab47c01e95 (diff) | |
ASoC: ep93xx: Fix unchecked clk_prepare_enable() and add rollback on failure
ep93xx_i2s_enable() calls clk_prepare_enable() on three clocks in
sequence (mclk, sclk, lrclk) without checking the return value of any
of them. If an intermediate enable fails, the clocks that were already
enabled are never rolled back, leaking them until the next disable cycle
— which may never come if the stream never started cleanly.
Change ep93xx_i2s_enable() from void to int. Add error checking after
each clk_prepare_enable() call and unwind already-enabled clocks on
failure. Propagate the error through ep93xx_i2s_startup() and
ep93xx_i2s_resume(), both of which already return int.
Signed-off-by: Jihed Chaibi <jihed.chaibi.dev@gmail.com>
Fixes: f4ff6b56bc8a ("ASoC: cirrus: i2s: Prepare clock before using it")
Link: https://patch.msgid.link/20260324210909.45494-1-jihed.chaibi.dev@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'fs/devfs/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
