Unverified Commit 3572ad82 authored by Mark Brown's avatar Mark Brown
Browse files

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.
parents 6c11aa2b 870b10f6
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -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.
+0 −5
Original line number Diff line number Diff line
@@ -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.
+0 −4
Original line number Diff line number Diff line
@@ -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) {