Skip to content

Commit 0493cf6

Browse files
committed
ASoC: sdw_utils: remove dai registered check
For some reason, we check if the DAI is registered before checking the endpoint is present. It will cause problem 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 65fd664 commit 0493cf6

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

sound/soc/sdw_utils/soc_sdw_utils.c

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1380,29 +1380,14 @@ static int is_sdca_endpoint_present(struct device *dev,
13801380
const struct snd_soc_acpi_adr_device *adr_dev = &adr_link->adr_d[adr_index];
13811381
const struct snd_soc_acpi_endpoint *adr_end;
13821382
const struct asoc_sdw_dai_info *dai_info;
1383-
struct snd_soc_dai_link_component *dlc;
1384-
struct snd_soc_dai *codec_dai;
13851383
struct sdw_slave *slave;
13861384
struct device *sdw_dev;
13871385
const char *sdw_codec_name;
13881386
int ret, i;
13891387

1390-
dlc = kzalloc(sizeof(*dlc), GFP_KERNEL);
1391-
if (!dlc)
1392-
return -ENOMEM;
1393-
13941388
adr_end = &adr_dev->endpoints[end_index];
13951389
dai_info = &codec_info->dais[adr_end->num];
13961390

1397-
dlc->dai_name = dai_info->dai_name;
1398-
codec_dai = snd_soc_find_dai_with_mutex(dlc);
1399-
if (!codec_dai) {
1400-
dev_warn(dev, "codec dai %s not registered yet\n", dlc->dai_name);
1401-
kfree(dlc);
1402-
return -EPROBE_DEFER;
1403-
}
1404-
kfree(dlc);
1405-
14061391
sdw_codec_name = _asoc_sdw_get_codec_name(dev, adr_link, adr_index);
14071392
if (!sdw_codec_name)
14081393
return -ENOMEM;

0 commit comments

Comments
 (0)