mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ASoC: cs35l56: Remove unnecessary goto in cs35l56_runtime_resume_common()
@ 2026-07-17  9:26 Richard Fitzgerald
  2026-07-18  1:40 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Fitzgerald @ 2026-07-17  9:26 UTC (permalink / raw)
  To: broonie; +Cc: linux-sound, linux-kernel, patches

The 'goto out_sync' in cs35l56_runtime_resume_common() is unnecessary
because it only skips a single if-statement and function call. It can
be replaced by inverting the conditional and merging it with the next
if-statement.

This was a legacy of an early version of the function, where more code
was skipped by the goto.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
---
 sound/soc/codecs/cs35l56-shared.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/sound/soc/codecs/cs35l56-shared.c b/sound/soc/codecs/cs35l56-shared.c
index f20bcdfd35af0..b40bd3a8d27b9 100644
--- a/sound/soc/codecs/cs35l56-shared.c
+++ b/sound/soc/codecs/cs35l56-shared.c
@@ -811,14 +811,10 @@ int cs35l56_runtime_resume_common(struct cs35l56_base *cs35l56_base, bool is_sou
 	if (!cs35l56_base->init_done)
 		return 0;
 
-	if (!cs35l56_base->can_hibernate)
-		goto out_sync;
-
-	/* Must be done before releasing cache-only */
-	if (!is_soundwire)
+	/* Hibernate wake must be done before releasing cache-only */
+	if (cs35l56_base->can_hibernate && !is_soundwire)
 		cs35l56_issue_wake_event(cs35l56_base);
 
-out_sync:
 	ret = cs35l56_wait_for_firmware_boot(cs35l56_base);
 	if (ret) {
 		dev_err(cs35l56_base->dev, "Hibernate wake failed: %d\n", ret);
-- 
2.47.3


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] ASoC: cs35l56: Remove unnecessary goto in cs35l56_runtime_resume_common()
  2026-07-17  9:26 [PATCH] ASoC: cs35l56: Remove unnecessary goto in cs35l56_runtime_resume_common() Richard Fitzgerald
@ 2026-07-18  1:40 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2026-07-18  1:40 UTC (permalink / raw)
  To: Richard Fitzgerald; +Cc: linux-sound, linux-kernel, patches

On Fri, 17 Jul 2026 10:26:55 +0100, Richard Fitzgerald wrote:
> ASoC: cs35l56: Remove unnecessary goto in cs35l56_runtime_resume_common()

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-7.3

Thanks!

[1/1] ASoC: cs35l56: Remove unnecessary goto in cs35l56_runtime_resume_common()
      https://git.kernel.org/broonie/sound/c/c462b2e14589

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-07-18 11:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-17  9:26 [PATCH] ASoC: cs35l56: Remove unnecessary goto in cs35l56_runtime_resume_common() Richard Fitzgerald
2026-07-18  1:40 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome