[PATCH] ASoC: cs35l56: Remove unnecessary goto in cs35l56_runtime_resume_common()

From: Richard Fitzgerald

Date: Fri Jul 17 2026 - 05:44:57 EST


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@xxxxxxxxxxxxxxxxxxxxx>
---
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