mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
To: James Schulman <james.schulman@cirrus.com>,
	David Rhodes <david.rhodes@cirrus.com>,
	Richard Fitzgerald <rf@opensource.cirrus.com>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>,
	Stefan Binding <sbinding@opensource.cirrus.com>,
	Charles Keepax <ckeepax@opensource.cirrus.com>,
	Vitaly Rodionov <vitalyr@opensource.cirrus.com>
Cc: alsa-devel@alsa-project.org, patches@opensource.cirrus.com,
	linux-kernel@vger.kernel.org, kernel@collabora.com
Subject: [PATCH v2 01/11] ASoC: cs35l41: Handle mdsync_down reg write errors
Date: Thu,  7 Sep 2023 20:10:00 +0300	[thread overview]
Message-ID: <20230907171010.1447274-2-cristian.ciocaltea@collabora.com> (raw)
In-Reply-To: <20230907171010.1447274-1-cristian.ciocaltea@collabora.com>

The return code of regmap_multi_reg_write() call related to "MDSYNC
down" sequence is shadowed by the subsequent
wait_for_completion_timeout() invocation, which is expected to time
timeout in case the write operation failed.

Let cs35l41_global_enable() return the correct error code instead of
-ETIMEDOUT.

Fixes: f5030564938b ("ALSA: cs35l41: Add shared boost feature")
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
---
 sound/soc/codecs/cs35l41-lib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/cs35l41-lib.c b/sound/soc/codecs/cs35l41-lib.c
index 4ec306cd2f47..a018f1d98428 100644
--- a/sound/soc/codecs/cs35l41-lib.c
+++ b/sound/soc/codecs/cs35l41-lib.c
@@ -1243,7 +1243,7 @@ int cs35l41_global_enable(struct device *dev, struct regmap *regmap, enum cs35l4
 		cs35l41_mdsync_down_seq[2].def = pwr_ctrl1;
 		ret = regmap_multi_reg_write(regmap, cs35l41_mdsync_down_seq,
 					     ARRAY_SIZE(cs35l41_mdsync_down_seq));
-		if (!enable)
+		if (ret || !enable)
 			break;
 
 		if (!pll_lock)
-- 
2.41.0


  reply	other threads:[~2023-09-07 17:11 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-07 17:09 [PATCH v2 00/11] Improve CS35l41-based audio codec drivers Cristian Ciocaltea
2023-09-07 17:10 ` Cristian Ciocaltea [this message]
2023-09-07 17:10 ` [PATCH v2 02/11] ASoC: cs35l41: Handle mdsync_up reg write errors Cristian Ciocaltea
2023-09-07 17:10 ` [PATCH v2 03/11] ASoC: cs35l41: Initialize completion object before requesting IRQ Cristian Ciocaltea
2023-09-07 17:10 ` [PATCH v2 04/11] ASoC: cs35l41: Fix broken shared boost activation Cristian Ciocaltea
2023-09-08 15:15   ` Rhodes, David
2023-09-07 17:10 ` [PATCH v2 05/11] ASoC: cs35l41: Verify PM runtime resume errors in IRQ handler Cristian Ciocaltea
2023-09-07 17:10 ` [PATCH v2 06/11] ASoC: cs35l41: Undo runtime PM changes at driver exit time Cristian Ciocaltea
2023-09-07 17:10 ` [PATCH v2 07/11] ASoC: cs35l41: Make use of dev_err_probe() Cristian Ciocaltea
2023-09-07 17:10 ` [PATCH v2 08/11] ASoC: cs35l41: Use modern pm_ops Cristian Ciocaltea
2023-09-07 17:10 ` [PATCH v2 09/11] ALSA: hda: cs35l41: Fix unbalanced pm_runtime_get() Cristian Ciocaltea
2023-09-07 17:10 ` [PATCH v2 10/11] ALSA: hda: cs35l41: Undo runtime PM changes at driver exit time Cristian Ciocaltea
2023-09-07 17:10 ` [PATCH v2 11/11] ALSA: hda: cs35l41: Consistently use dev_err_probe() Cristian Ciocaltea
2023-09-07 17:21 ` [PATCH v2 00/11] Improve CS35l41-based audio codec drivers Mark Brown
2023-09-07 17:27   ` Cristian Ciocaltea
2023-09-11  6:25     ` Takashi Iwai
2023-09-11 23:57 ` Mark Brown

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=20230907171010.1447274-2-cristian.ciocaltea@collabora.com \
    --to=cristian.ciocaltea@collabora.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=ckeepax@opensource.cirrus.com \
    --cc=david.rhodes@cirrus.com \
    --cc=james.schulman@cirrus.com \
    --cc=kernel@collabora.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=patches@opensource.cirrus.com \
    --cc=perex@perex.cz \
    --cc=rf@opensource.cirrus.com \
    --cc=sbinding@opensource.cirrus.com \
    --cc=tiwai@suse.com \
    --cc=vitalyr@opensource.cirrus.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®