Skip to content

Commit 61a50d6

Browse files
jhovoldbroonie
authored andcommitted
ASoC: codecs: wcd937x: 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: 9be3ec1 ("ASoC: codecs: wcd937x: add wcd937x codec driver") Cc: Prasad Kumpatla <prasad.kumpatla@oss.qualcomm.com> Signed-off-by: Johan Hovold <johan@kernel.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Link: https://patch.msgid.link/20251219142715.19254-3-johan@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 54fa71f commit 61a50d6

1 file changed

Lines changed: 0 additions & 5 deletions

File tree

sound/soc/codecs/wcd937x.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2763,11 +2763,6 @@ static int wcd937x_bind(struct device *dev)
27632763
wcd937x->sdw_priv[AIF1_CAP] = dev_get_drvdata(wcd937x->txdev);
27642764
wcd937x->sdw_priv[AIF1_CAP]->wcd937x = wcd937x;
27652765
wcd937x->tx_sdw_dev = dev_to_sdw_dev(wcd937x->txdev);
2766-
if (!wcd937x->tx_sdw_dev) {
2767-
dev_err(dev, "could not get txslave with matching of dev\n");
2768-
ret = -EINVAL;
2769-
goto err_put_txdev;
2770-
}
27712766

27722767
/*
27732768
* As TX is the main CSR reg interface, which should not be suspended first.

0 commit comments

Comments
 (0)