Skip to content

Commit 5a8d8f2

Browse files
committed
ASoC: sdw_utils: remove dai registered check
Checking for a registered DAI for non-existing endpoints causes the following error. The driver will always return -EPROBE_DEFER if the codec driver doesn't register the DAI of the unexist endpoint. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
1 parent 3e33a58 commit 5a8d8f2

1 file changed

Lines changed: 0 additions & 15 deletions

File tree

sound/soc/sdw_utils/soc_sdw_utils.c

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1396,29 +1396,14 @@ static int is_sdca_endpoint_present(struct device *dev,
13961396
const struct snd_soc_acpi_adr_device *adr_dev = &adr_link->adr_d[adr_index];
13971397
const struct snd_soc_acpi_endpoint *adr_end;
13981398
const struct asoc_sdw_dai_info *dai_info;
1399-
struct snd_soc_dai_link_component *dlc;
1400-
struct snd_soc_dai *codec_dai;
14011399
struct sdw_slave *slave;
14021400
struct device *sdw_dev;
14031401
const char *sdw_codec_name;
14041402
int ret, i;
14051403

1406-
dlc = kzalloc(sizeof(*dlc), GFP_KERNEL);
1407-
if (!dlc)
1408-
return -ENOMEM;
1409-
14101404
adr_end = &adr_dev->endpoints[end_index];
14111405
dai_info = &codec_info->dais[adr_end->num];
14121406

1413-
dlc->dai_name = dai_info->dai_name;
1414-
codec_dai = snd_soc_find_dai_with_mutex(dlc);
1415-
if (!codec_dai) {
1416-
dev_warn(dev, "codec dai %s not registered yet\n", dlc->dai_name);
1417-
kfree(dlc);
1418-
return -EPROBE_DEFER;
1419-
}
1420-
kfree(dlc);
1421-
14221407
sdw_codec_name = _asoc_sdw_get_codec_name(dev, adr_link, adr_index);
14231408
if (!sdw_codec_name)
14241409
return -ENOMEM;

0 commit comments

Comments
 (0)