linux/sound
Harshit Mogalapalli fef1f75615
ASoC: cs4271: Fix resource leak in cs4271_soc_resume()
Smatch detects this resource leak:

sound/soc/codecs/cs4271.c:548 cs4271_soc_resume() warn:
 'cs4271->clk' from clk_prepare_enable() not released on lines: 540,546.

Instead of direct returns, unprepare the clock and disable regulators on
the error paths.

Fixes: cf6bf51b53 ("ASoC: cs4271: Add support for the external mclk")
Fixes: 9a397f4736 ("ASoC: cs4271: add regulator consumer support")
Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Acked-by: Herve Codina <herve.codina@bootlin.com>
Reviewed-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
Link: https://patch.msgid.link/20260110195337.2522347-1-harshit.m.mogalapalli@oracle.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-02-05 00:46:04 +00:00
..
ac97 ALSA: ac97: fix a double free in snd_ac97_controller_register() 2025-12-23 10:43:43 +01:00
aoa ALSA: aoa: Remove redundant size arguments from strscpy() 2025-09-12 07:54:40 +02:00
arm ASoC: ac97: Convert to GPIO descriptors 2026-01-27 12:45:57 +00:00
atmel ALSA: atmel: Use guard() for mutex locks 2025-09-01 13:54:28 +02:00
core ALSA: pcm: Improve the fix for race of buffer access at PCM OSS layer 2026-01-08 08:07:54 +01:00
drivers ALSA: pcmtest: Replace deprecated strcpy with strscpy_pad in setup_patt_bufs 2025-11-19 17:16:49 +01:00
firewire sound fixes for 6.19-rc1 2025-12-13 16:09:10 +12:00
hda ASoC: tas2781: Put three different calibrated data solution into the same data structure 2026-02-04 13:38:02 +00:00
i2c ALSA: i2c: Use guard() for spin locks 2025-09-01 13:54:26 +02:00
isa ALSA: gus: Remove unused declarations 2025-11-12 10:34:44 +01:00
mips ALSA: snd-n64: Use guard() for spin locks 2025-09-10 13:20:01 +02:00
oss
parisc ALSA: parisc: Use guard() for spin locks 2025-09-10 13:20:01 +02:00
pci ALSA: ctxfi: Fix potential OOB access in audio mixer handling 2026-01-19 14:32:55 +01:00
pcmcia ALSA: pcmcia: Fix resource leak in snd_pdacf_probe error path 2025-12-15 10:11:19 +01:00
ppc ALSA: ppc: Use guard() for spin locks 2025-09-10 13:20:01 +02:00
sh ALSA: sh: Use safer strscpy() instead of strcpy() 2025-07-11 09:53:35 +02:00
soc ASoC: cs4271: Fix resource leak in cs4271_soc_resume() 2026-02-05 00:46:04 +00:00
sparc ALSA: sparc/dbri: Use guard() for spin locks 2025-09-10 13:20:01 +02:00
spi ALSA: spi/at73c213: Use guard() for spin locks 2025-09-17 14:07:02 +02:00
synth ALSA: synth: Use guard() for preset locks 2025-09-01 13:54:27 +02:00
usb ALSA: usb-audio: Use the right limit for PCM OOB check 2026-01-21 09:22:12 +01:00
virtio ALSA: virtio: Use guard() for spin locks 2025-09-01 13:54:28 +02:00
x86 ALSA: x86: Use guard() for spin locks 2025-09-01 13:54:27 +02:00
xen ALSA: xen: Use guard() for mutex locks 2025-09-01 13:54:27 +02:00
ac97_bus.c ALSA: ac97: Fix kernel-doc warning for snd_ac97_reset 2025-11-06 10:52:43 +01:00
Kconfig
last.c
Makefile
sound_core.c