aboutsummaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2025-12-22 22:13:03 +0000
committerMark Brown <broonie@kernel.org>2025-12-22 22:13:03 +0000
commit3572ad82201baeed840f1959787e0e1281e7f937 (patch)
tree1e542363d4a376fec39300fa656e99e86eeff556 /sound
parent6c11aa2b4cf767f5ccfe290b2572d53102dbe5ea (diff)
parent870b10f61d527fec594e0888f18cc4f32c47433d (diff)
ASoC: drop bogus container_of() error handling
Merge series from Johan Hovold <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.
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/pm4125.c6
-rw-r--r--sound/soc/codecs/wcd937x.c5
-rw-r--r--sound/soc/sdw_utils/soc_sdw_utils.c4
3 files changed, 0 insertions, 15 deletions
diff --git a/sound/soc/codecs/pm4125.c b/sound/soc/codecs/pm4125.c
index 43dcafff6c77..1f0a3f5389f1 100644
--- a/sound/soc/codecs/pm4125.c
+++ b/sound/soc/codecs/pm4125.c
@@ -1533,13 +1533,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.
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.
diff --git a/sound/soc/sdw_utils/soc_sdw_utils.c b/sound/soc/sdw_utils/soc_sdw_utils.c
index f169d95895ea..bf382aa07e92 100644
--- a/sound/soc/sdw_utils/soc_sdw_utils.c
+++ b/sound/soc/sdw_utils/soc_sdw_utils.c
@@ -1414,10 +1414,6 @@ static int is_sdca_endpoint_present(struct device *dev,
}
slave = dev_to_sdw_dev(sdw_dev);
- if (!slave) {
- ret = -EINVAL;
- goto put_device;
- }
/* Make sure BIOS provides SDCA properties */
if (!slave->sdca_data.interface_revision) {