1
0
mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2026-01-11 17:10:13 +00:00

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.
This commit is contained in:
Mark Brown 2025-12-22 22:13:03 +00:00
commit 3572ad8220
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
3 changed files with 0 additions and 15 deletions

View File

@ -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.

View File

@ -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.

View File

@ -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) {