Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions sound/soc/sof/intel/hda.c
Original file line number Diff line number Diff line change
Expand Up @@ -1184,6 +1184,15 @@ static struct snd_soc_acpi_adr_device *find_acpi_adr_device(struct device *dev,
}

name_prefix = codec_info_list[i].name_prefix;
/*
* This should not happen, but add a paranoid check to avoid NULL pointer
* dereference
*/
if (!name_prefix) {
dev_err(dev, "codec_info_list name_prefix of part id %#x is missing\n",
codec_info_list[i].part_id);
return NULL;
}
for (j = 0; j < codec_info_list[i].dai_num; j++) {
/* Check if the endpoint is present by the SDCA DisCo table */
if (!is_endpoint_present(sdw_device, &codec_info_list[i],
Expand Down Expand Up @@ -1391,6 +1400,8 @@ static struct snd_soc_acpi_mach *hda_sdw_machine_select(struct snd_sof_dev *sdev
link_index = hweight32(link_mask & (BIT(peripherals->array[i]->bus->link_id) - 1));
links[link_index].adr_d = find_acpi_adr_device(sdev->dev, peripherals->array[i],
&links[link_index], &amp_index);
if (!links[link_index].adr_d)
return NULL;
}

mach->drv_name = "sof_sdw";
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/sof/topology.c
Original file line number Diff line number Diff line change
Expand Up @@ -2525,7 +2525,7 @@ int snd_sof_load_topology(struct snd_soc_component *scomp, const char *file)
if (!tplg_cnt) {
if (strstr(file, "dummy")) {
dev_err(scomp->dev,
"Function topology is required, please upgrade sof-bin\n");
"Function topology is required, please upgrade sof-firmware\n");
return -EINVAL;
}
tplg_files[0] = file;
Expand Down
Loading