diff options
| author | Richard Fitzgerald <rf@opensource.cirrus.com> | 2026-11-04 11:11:21 +0000 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2026-11-05 08:54:46 +0100 |
| commit | d2895945d37e3426191894a010f94db31c206e10 (patch) | |
| tree | 899b2a7a49efd4cc1de07ca8b7dd901fec7c1f54 /scripts/Makefile.thinlto | |
| parent | 42bbdb212cb37d3653ef7542114b8cd3e6263657 (diff) | |
| download | linux-next-d2895945d37e3426191894a010f94db31c206e10.tar.gz linux-next-d2895945d37e3426191894a010f94db31c206e10.zip | |
ALSA: hda: cs35l56: Fix mixed cleanup and goto in cs35l56_hda_fw_load()
Remove the gotos from cs35l56_hda_fw_load() to prevent mixing
auto-cleanup and goto-cleanup in the same function. Replace them with
returns and remove the goto cleanup code, as there's no need to "undo"
a cs_dsp_power_up() with a cs_dsp_power_down() here.
Two previous commits added auto-cleanup to cs35l56_hda_fw_load() but
didn't remove the goto, which leaves mixed cleanup and goto.
commit 0ff22680e51f4 ("ALSA: hda/cs35l56: Clean up with
PM_RUNTIME_ACQUIRE*() macros")
commit 185841c94accc ("ALSA: hda: cs35l56: Use auto-cleanup for firmware
loading")
There's actually no need to call cs_dsp_power_down() here. On the
CS35L54/56/57 amps it doesn't control the DSP subsystem power (that is all
managed by the firmware), so it's perfectly safe to just return if there
are any errors after a successful cs_dsp_power_up(). As cs_dsp_power_up()
was successful it is valid to leave cs_dsp in this state, which matches
the state of the hardware.
The two places that cs_dsp_power_down() is called conditionally have been
changed to check the cs_dsp.booted flag, now the fw_patched flag is not
a guaranteed proxy. The booted flag is directly indicating that there has
been a successful cs_dsp_power_up() so this is more correct anyway.
Fixes: 0ff22680e51f4 ("ALSA: hda/cs35l56: Clean up with PM_RUNTIME_ACQUIRE*() macros")
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20261104111121.1054077-1-rf@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
