From: Takashi Iwai <tiwai@suse.de>
To: Richard Fitzgerald <rf@opensource.cirrus.com>
Cc: tiwai@suse.com, linux-sound@vger.kernel.org,
linux-kernel@vger.kernel.org, patches@opensource.cirrus.com
Subject: Re: [PATCH] ALSA: hda: cs35l56: Fix mixed cleanup and goto in cs35l56_hda_fw_load()
Date: Wed, 04 Nov 2026 15:43:55 +0100 [thread overview]
Message-ID: <87wlqsu05w.wl-tiwai@suse.de> (raw)
In-Reply-To: <20261104111121.1054077-1-rf@opensource.cirrus.com>
On Wed, 04 Nov 2026 12:11:21 +0100,
Richard Fitzgerald wrote:
>
> 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>
Applied now. Thanks.
Takashi
prev parent reply other threads:[~2026-11-04 14:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-04 11:11 Richard Fitzgerald
2026-11-04 14:43 ` Takashi Iwai [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wlqsu05w.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=patches@opensource.cirrus.com \
--cc=rf@opensource.cirrus.com \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®