From nobody Mon Feb 9 15:32:25 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7705BEC8742 for ; Thu, 7 Sep 2023 17:11:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241575AbjIGRLl (ORCPT ); Thu, 7 Sep 2023 13:11:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43830 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237003AbjIGRLj (ORCPT ); Thu, 7 Sep 2023 13:11:39 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 122311BCA for ; Thu, 7 Sep 2023 10:11:12 -0700 (PDT) Received: from localhost (unknown [81.18.92.207]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: cristicc) by madras.collabora.co.uk (Postfix) with ESMTPSA id EA96166072BA; Thu, 7 Sep 2023 18:10:17 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1694106618; bh=qbGf9dTskivmBZH5bu+AEo0oFeT7I13FlT9OFQJZyls=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LQRBunHiDczrq43E+clWbn9RMyk+/WWLK3X5J7sAsRcgFttDr3Ng4pVKVpuS7U9Lg cERBQmBbo339i5OHr0Te8p6KuQCQb4MyFC8ApnCmoCJgwJ70F97SYkJ7rFKuRxINAP YzBqEn96OpxRqKUkMjdCboFagVqs8swhC+BMzdEpjixlGPZwGhHvB7XPHeesThRRMI I0xa1j8ddKYC+WAhm55RuQH9ZJKlRPWFE6I3043dWJA/aBb7wG95rg5g1QVsxoaG2k lRDVuqkeskvbQsMSvtzIUdXmYUCyWNwnfhvTWyCXV5+6+AR+VyLfXrqH82dSDRUG0L W4gsFq7wS8/nQ== From: Cristian Ciocaltea To: James Schulman , David Rhodes , Richard Fitzgerald , Jaroslav Kysela , Takashi Iwai , Liam Girdwood , Mark Brown , Stefan Binding , Charles Keepax , Vitaly Rodionov 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 Message-ID: <20230907171010.1447274-2-cristian.ciocaltea@collabora.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907171010.1447274-1-cristian.ciocaltea@collabora.com> References: <20230907171010.1447274-1-cristian.ciocaltea@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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 Acked-by: Charles Keepax --- 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 =3D pwr_ctrl1; ret =3D regmap_multi_reg_write(regmap, cs35l41_mdsync_down_seq, ARRAY_SIZE(cs35l41_mdsync_down_seq)); - if (!enable) + if (ret || !enable) break; =20 if (!pll_lock) --=20 2.41.0