Skip to content

Commit 54fa71f

Browse files
jhovoldbroonie
authored andcommitted
ASoC: codecs: pm4125: 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: 8ad5294 ("ASoC: codecs: add new pm4125 audio codec driver") Cc: Alexey Klimov <alexey.klimov@linaro.org> Signed-off-by: Johan Hovold <johan@kernel.org> Acked-by: Alexey Klimov <alexey.klimov@linaro.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Link: https://patch.msgid.link/20251219142715.19254-2-johan@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 56d953a commit 54fa71f

1 file changed

Lines changed: 0 additions & 6 deletions

File tree

sound/soc/codecs/pm4125.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1537,13 +1537,7 @@ static int pm4125_bind(struct device *dev)
15371537

15381538
pm4125->sdw_priv[AIF1_CAP] = dev_get_drvdata(pm4125->txdev);
15391539
pm4125->sdw_priv[AIF1_CAP]->pm4125 = pm4125;
1540-
15411540
pm4125->tx_sdw_dev = dev_to_sdw_dev(pm4125->txdev);
1542-
if (!pm4125->tx_sdw_dev) {
1543-
dev_err(dev, "could not get txslave with matching of dev\n");
1544-
ret = -EINVAL;
1545-
goto error_put_tx;
1546-
}
15471541

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

0 commit comments

Comments
 (0)