[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251219142715.19254-3-johan@kernel.org>
Date: Fri, 19 Dec 2025 15:27:14 +0100
From: Johan Hovold <johan@...nel.org>
To: Srinivas Kandagatla <srini@...nel.org>,
Mark Brown <broonie@...nel.org>
Cc: Liam Girdwood <lgirdwood@...il.com>,
linux-sound@...r.kernel.org,
linux-arm-msm@...r.kernel.org,
linux-kernel@...r.kernel.org,
Johan Hovold <johan@...nel.org>,
Prasad Kumpatla <prasad.kumpatla@....qualcomm.com>
Subject: [PATCH 2/3] ASoC: codecs: wcd937x: drop bogus container_of() error handling
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@....qualcomm.com>
Signed-off-by: Johan Hovold <johan@...nel.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
Powered by blists - more mailing lists