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:
commit
3572ad8220
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user