Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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.

-15
-6
sound/soc/codecs/pm4125.c
··· 1533 1533 1534 1534 pm4125->sdw_priv[AIF1_CAP] = dev_get_drvdata(pm4125->txdev); 1535 1535 pm4125->sdw_priv[AIF1_CAP]->pm4125 = pm4125; 1536 - 1537 1536 pm4125->tx_sdw_dev = dev_to_sdw_dev(pm4125->txdev); 1538 - if (!pm4125->tx_sdw_dev) { 1539 - dev_err(dev, "could not get txslave with matching of dev\n"); 1540 - ret = -EINVAL; 1541 - goto error_put_tx; 1542 - } 1543 1537 1544 1538 /* 1545 1539 * As TX is the main CSR reg interface, which should not be suspended first.
-5
sound/soc/codecs/wcd937x.c
··· 2763 2763 wcd937x->sdw_priv[AIF1_CAP] = dev_get_drvdata(wcd937x->txdev); 2764 2764 wcd937x->sdw_priv[AIF1_CAP]->wcd937x = wcd937x; 2765 2765 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 - } 2771 2766 2772 2767 /* 2773 2768 * As TX is the main CSR reg interface, which should not be suspended first.
-4
sound/soc/sdw_utils/soc_sdw_utils.c
··· 1414 1414 } 1415 1415 1416 1416 slave = dev_to_sdw_dev(sdw_dev); 1417 - if (!slave) { 1418 - ret = -EINVAL; 1419 - goto put_device; 1420 - } 1421 1417 1422 1418 /* Make sure BIOS provides SDCA properties */ 1423 1419 if (!slave->sdca_data.interface_revision) {