From: Johan Hovold <johan@kernel.org>
To: Srinivas Kandagatla <srini@kernel.org>, Mark Brown <broonie@kernel.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
linux-sound@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-kernel@vger.kernel.org, Johan Hovold <johan@kernel.org>,
Prasad Kumpatla <prasad.kumpatla@oss.qualcomm.com>
Subject: [PATCH 2/3] ASoC: codecs: wcd937x: drop bogus container_of() error handling
Date: Fri, 19 Dec 2025 15:27:14 +0100 [thread overview]
Message-ID: <20251219142715.19254-3-johan@kernel.org> (raw)
In-Reply-To: <20251219142715.19254-1-johan@kernel.org>
The dev_to_sdw_dev() helper uses container_of() to return the containing
soundwire device structure of its pointer argument and will never return
NULL.
Fixes: 9be3ec196da4 ("ASoC: codecs: wcd937x: add wcd937x codec driver")
Cc: Prasad Kumpatla <prasad.kumpatla@oss.qualcomm.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
---
sound/soc/codecs/wcd937x.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/sound/soc/codecs/wcd937x.c b/sound/soc/codecs/wcd937x.c
index f4dbcf04be49..10a2d598caa7 100644
--- a/sound/soc/codecs/wcd937x.c
+++ b/sound/soc/codecs/wcd937x.c
@@ -2763,11 +2763,6 @@ static int wcd937x_bind(struct device *dev)
wcd937x->sdw_priv[AIF1_CAP] = dev_get_drvdata(wcd937x->txdev);
wcd937x->sdw_priv[AIF1_CAP]->wcd937x = wcd937x;
wcd937x->tx_sdw_dev = dev_to_sdw_dev(wcd937x->txdev);
- if (!wcd937x->tx_sdw_dev) {
- dev_err(dev, "could not get txslave with matching of dev\n");
- ret = -EINVAL;
- goto err_put_txdev;
- }
/*
* As TX is the main CSR reg interface, which should not be suspended first.
--
2.51.2
next prev parent reply other threads:[~2025-12-19 14:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-19 14:27 [PATCH 0/3] ASoC: drop bogus container_of() error handling Johan Hovold
2025-12-19 14:27 ` [PATCH 1/3] ASoC: codecs: pm4125: " Johan Hovold
2025-12-22 4:22 ` Alexey Klimov
2025-12-19 14:27 ` Johan Hovold [this message]
2025-12-19 14:27 ` [PATCH 3/3] ASoC: soc_sdw_utils: " Johan Hovold
2025-12-19 14:47 ` Konrad Dybcio
2025-12-20 18:56 ` [PATCH 0/3] ASoC: " Dmitry Baryshkov
2025-12-22 22:56 ` 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=20251219142715.19254-3-johan@kernel.org \
--to=johan@kernel.org \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=prasad.kumpatla@oss.qualcomm.com \
--cc=srini@kernel.org \
/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