Message ID | 20240117151208.1219755-1-krzysztof.kozlowski@linaro.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-29136-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:42cf:b0:101:a8e8:374 with SMTP id q15csp974966dye; Wed, 17 Jan 2024 07:14:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IGpnhutrIGU3JXco+jA0v0Fye9XHMFIXarWskDGvvm8nc8pdwkSID93FyXwpObtinHmQKvy X-Received: by 2002:a17:907:1685:b0:a2d:4bfc:61e5 with SMTP id cx5-20020a170907168500b00a2d4bfc61e5mr3656962ejd.149.1705504473997; Wed, 17 Jan 2024 07:14:33 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705504473; cv=pass; d=google.com; s=arc-20160816; b=Ag9r3Q9YefU1e0nlsLABxJlMMPpPBHN9Y2a4/0eBPnORbJzGlvfEJqexEnbrM1KdAm ky4YUOXRw6z4f2TpJ1EtVsfmrW1LOVuyeoLIWTpxgTJ6lrFybjdd9uR94gwA3nS5HA6x gPqGflfdiUUYAq4CPo/fW/DzOp0kjuEb4RCTnOORZytAzHZ8V47b2lwAnmihak8Jc2t0 lyAipG4fyX/tfHQyRHgLaB5kAqfgn0BiTVWT5LQ4zRBgh4s8EbLQR9NNBfeTl+IRsQUM 5S9Tft0q5FIy8RiS0anqWdJd0NyNykVKITFkFiaYZOAK5qgr7cF6/qe/f/XI0ISk4iad AT0g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=aZ5dWg/o67onmhTzNFtXrOTvUPTxoBK6DGUcni7z13M=; fh=EDkoPUm3nxp+aCKUIYbfwJC6fB9WqaG4ypRF6SRM1m8=; b=u5jU4q+wPimF1Ys9LYVLv3yskwmPYzqFwij7PV5u72+BOxVqti2hliV2ctRH4XdgEd XyBO7lmABBt+qcSA4EFtdt8EDgxQ9k6GopfmWG/VCmXsSuWyptnMfL3kPd0fBeYYYtgn YNBjRL0J9dUU2YnxfATDBMwZDIOZSds9JZ2/w2B0RDIPegurBy40oZulV9M+Fj3af+Z2 BF0WkGXGaulS9jpnkf1MVxcOpAMwmQAiOQEjIAZF67n1SvPkJtef2e8EeLuUMhzxxLSY AfjFqgSIKbX4psFvpgxTGAJsNGag4fAA1QGPdb+kqadWX/8dJNspWr7pC3DTAilwQFmF pEqg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IrakBhjW; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-29136-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-29136-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id x8-20020a1709064bc800b00a2c4c45e73bsi5850964ejv.84.2024.01.17.07.14.33 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 07:14:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-29136-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IrakBhjW; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-29136-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-29136-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 9978F1F22F0B for <ouuuleilei@gmail.com>; Wed, 17 Jan 2024 15:14:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BD89923741; Wed, 17 Jan 2024 15:12:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="IrakBhjW" Received: from mail-qk1-f177.google.com (mail-qk1-f177.google.com [209.85.222.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7DB0E225A6 for <linux-kernel@vger.kernel.org>; Wed, 17 Jan 2024 15:12:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.177 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705504341; cv=none; b=VKx7W92XAT2AnMsKYeh5Irz8xwwqkOgEMrmISDu/wrIrwPwlbLV8iTBkqmFdgRI5uDI7btmVIv2cDPwQD3Q1MaP7nhf7jpBFCtIkFX6sNwCO2FR3t4NxwKpsydauJ/FI1L53bk+LhB7PysMz42xwreaLVSxl8TT26TzN6sl2whY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705504341; c=relaxed/simple; bh=zTLF4pKwDUhmIJpTw+ifYX48G8Y/tLdkZCXLW1dsOdg=; h=Received:DKIM-Signature:X-Google-DKIM-Signature: X-Gm-Message-State:X-Google-Smtp-Source:X-Received:Received:From: To:Cc:Subject:Date:Message-Id:X-Mailer:MIME-Version: Content-Transfer-Encoding; b=fdHiURtFKS/zpA3NOeiwjlGPjMQliopUWpHv2T5xFWD0P3tkeS1zfitXeH5cUDpw+XQLedS86jHLVR+pc7ge5cW3C69oR/llGo9KPkfvHbwaAndszZQoEAvqAJw/AjRgxDF+hcLglEFqPTWXQXmO74YVYjQxaG0dlNciAeQYP+c= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=IrakBhjW; arc=none smtp.client-ip=209.85.222.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-qk1-f177.google.com with SMTP id af79cd13be357-7831b3a48e7so661077085a.3 for <linux-kernel@vger.kernel.org>; Wed, 17 Jan 2024 07:12:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1705504338; x=1706109138; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=aZ5dWg/o67onmhTzNFtXrOTvUPTxoBK6DGUcni7z13M=; b=IrakBhjWYcTx281uJkfflWwa2NOYOeI1bCsGnxGVZrm6IjaBFUx7p0duk6zyKECBmQ dY/7X03ylYyCkWz59EehpkTbs8mKqgtBHJSZ/QWQeK9fDPI283k0wJ5UmQqtlYKrPGvm OWbP23UZMsfMSm6B5xliduX7ujbSXRKph1AgCZgFWgKSMVdp1T9fLtX8ov9Ec9aeYYom baa9xku1mtGfyq662seh7VQELl01Wg64sLh8kFd8W0DgONwth41KNlNEvdhFNdGIab1q MyE30R3wPb+HvgHbmC1dHoBz3oqYYXHlpjMqxwL0GJYb5nPqsbQk+O9wFMXudX9GodPm tceQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705504338; x=1706109138; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=aZ5dWg/o67onmhTzNFtXrOTvUPTxoBK6DGUcni7z13M=; b=ZEi1/MYdLUMVgUL1MMbSvDsoJCc0DtSW8bKpEG7A0rmjwhlPZo6utjN68WyIHKaQFG wDQ2CsrUlNzqY+96KGhw1fSv+hs43wtniv4KE41x5rGnFPm3lI5SMCm4d8QBsoHdx8++ cH7X4GggLxEeoyt2UQ36sScePKMdhxVcTUtL/jUJB5OE1ghkd+auiKtHMhB5QXFEs5kX ax/cqdN68q94QirlP4cxBayC5mZrM/FfD8cSVsrPOvzrMfORQ0Geope4InucQeOMU9yZ YlhR7mCskNtuH6K0TkuPZlwZnv2OMcy+m3rsDUCN+x13mTOFicVASBlpEMS+PJzMIgxe TMQA== X-Gm-Message-State: AOJu0Yz1qM8pK98QSPQQjVKY6HSpJgN7OA1eDu6101c46u4LQkL3KCcK N9+By2vbVDkC1Rz1flageXdlwe4HBq41lg== X-Received: by 2002:a05:620a:55b0:b0:783:54a1:136f with SMTP id vr16-20020a05620a55b000b0078354a1136fmr5882267qkn.58.1705504338226; Wed, 17 Jan 2024 07:12:18 -0800 (PST) Received: from krzk-bin.. ([178.197.215.66]) by smtp.gmail.com with ESMTPSA id m7-20020a05620a24c700b007816cf21f7asm4519337qkn.76.2024.01.17.07.12.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 07:12:17 -0800 (PST) From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> To: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>, Banajit Goswami <bgoswami@quicinc.com>, Liam Girdwood <lgirdwood@gmail.com>, Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>, alsa-devel@alsa-project.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>, stable@vger.kernel.org Subject: [PATCH 1/3] ASoC: codecs: wcd938x: handle deferred probe Date: Wed, 17 Jan 2024 16:12:06 +0100 Message-Id: <20240117151208.1219755-1-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788351059234135542 X-GMAIL-MSGID: 1788351059234135542 |
Series |
[1/3] ASoC: codecs: wcd938x: handle deferred probe
|
|
Commit Message
Krzysztof Kozlowski
Jan. 17, 2024, 3:12 p.m. UTC
WCD938x sound codec driver ignores return status of getting regulators
and returns EINVAL instead of EPROBE_DEFER. If regulator provider
probes after the codec, system is left without probed audio:
wcd938x_codec audio-codec: wcd938x_probe: Fail to obtain platform data
wcd938x_codec: probe of audio-codec failed with error -22
Fixes: 16572522aece ("ASoC: codecs: wcd938x-sdw: add SoundWire driver")
Cc: <stable@vger.kernel.org>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
sound/soc/codecs/wcd938x.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On Wed, Jan 17, 2024 at 04:12:06PM +0100, Krzysztof Kozlowski wrote: > if (ret) { > dev_err(dev, "%s: Fail to obtain platform data\n", __func__); > - return -EINVAL; > + return ret; Should this be a dev_err_probe() as well?
On 17/01/2024 16:22, Mark Brown wrote: > On Wed, Jan 17, 2024 at 04:12:06PM +0100, Krzysztof Kozlowski wrote: > >> if (ret) { >> dev_err(dev, "%s: Fail to obtain platform data\n", __func__); >> - return -EINVAL; >> + return ret; > > Should this be a dev_err_probe() as well? It should be just dropped, which I do in the next patch. Errors are already printed in called wcd938x_populate_dt_data() (with dev_err_probe). However I decided to split them, as only this one is a candidate for backport, IMO. Feel free to squash the next (2/3) into this one. Best regards, Krzysztof
On Wed, 17 Jan 2024 16:12:06 +0100, Krzysztof Kozlowski wrote: > WCD938x sound codec driver ignores return status of getting regulators > and returns EINVAL instead of EPROBE_DEFER. If regulator provider > probes after the codec, system is left without probed audio: > > wcd938x_codec audio-codec: wcd938x_probe: Fail to obtain platform data > wcd938x_codec: probe of audio-codec failed with error -22 > > [...] Applied to https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next Thanks! [1/3] ASoC: codecs: wcd938x: handle deferred probe commit: 086df711d9b886194481b4fbe525eb43e9ae7403 [2/3] ASoC: codecs: wcd938x: skip printing deferred probe failuers commit: 22221b13d0c20a9791dec33121df73fe0b2ac226 [3/3] ASoC: codecs: wcd934x: drop unneeded regulator include commit: 35314e39dabcfb256832654ad0e856a9fba744bd 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
diff --git a/sound/soc/codecs/wcd938x.c b/sound/soc/codecs/wcd938x.c index faf8d3f9b3c5..0aaf494844aa 100644 --- a/sound/soc/codecs/wcd938x.c +++ b/sound/soc/codecs/wcd938x.c @@ -3589,7 +3589,7 @@ static int wcd938x_probe(struct platform_device *pdev) ret = wcd938x_populate_dt_data(wcd938x, dev); if (ret) { dev_err(dev, "%s: Fail to obtain platform data\n", __func__); - return -EINVAL; + return ret; } ret = wcd938x_add_slave_components(wcd938x, dev, &match);