diff options
| author | Johan Hovold <johan@kernel.org> | 2025-12-19 15:27:13 +0100 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2025-12-22 09:14:51 +0000 |
| commit | 54fa71f5f965fa3ec8846cef9d1154bcb2ba2850 (patch) | |
| tree | ba5b52ee1cf635232d5a1447e59e783cedb421cb /sound | |
| parent | 56d953a8d0da5e53c2594edde23465ec49385b1c (diff) | |
ASoC: codecs: pm4125: 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: 8ad529484937 ("ASoC: codecs: add new pm4125 audio codec driver")
Cc: Alexey Klimov <alexey.klimov@linaro.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Acked-by: Alexey Klimov <alexey.klimov@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Link: https://patch.msgid.link/20251219142715.19254-2-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
| -rw-r--r-- | sound/soc/codecs/pm4125.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/sound/soc/codecs/pm4125.c b/sound/soc/codecs/pm4125.c index 8bc3b9994019..4798cd8be9f8 100644 --- a/sound/soc/codecs/pm4125.c +++ b/sound/soc/codecs/pm4125.c @@ -1537,13 +1537,7 @@ static int pm4125_bind(struct device *dev) pm4125->sdw_priv[AIF1_CAP] = dev_get_drvdata(pm4125->txdev); pm4125->sdw_priv[AIF1_CAP]->pm4125 = pm4125; - pm4125->tx_sdw_dev = dev_to_sdw_dev(pm4125->txdev); - if (!pm4125->tx_sdw_dev) { - dev_err(dev, "could not get txslave with matching of dev\n"); - ret = -EINVAL; - goto error_put_tx; - } /* * As TX is the main CSR reg interface, which should not be suspended first. |
