Skip to content

Commit 30ef1d9

Browse files
committed
ASoC: SOF: Intel: hda: do not use missing devm_kmalloc_array()
JIRA: https://issues.redhat.com/browse/RHEL-80657 Upstream-status: RHEL-only Signed-off-by: Jaroslav Kysela <jkysela@redhat.com>
1 parent 0931ea2 commit 30ef1d9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sound/soc/sof/intel/hda.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1053,8 +1053,7 @@ static void hda_generic_machine_select(struct snd_sof_dev *sdev,
10531053
* make a local copy of the match array since we might
10541054
* be modifying it
10551055
*/
1056-
hda_mach = devm_kmemdup_array(sdev->dev,
1057-
snd_soc_acpi_intel_hda_machines,
1056+
hda_mach = devm_kmalloc_array(sdev->dev,
10581057
2, /* we have one entry + sentinel in the array */
10591058
sizeof(snd_soc_acpi_intel_hda_machines[0]),
10601059
GFP_KERNEL);
@@ -1064,6 +1063,7 @@ static void hda_generic_machine_select(struct snd_sof_dev *sdev,
10641063
__func__);
10651064
return;
10661065
}
1066+
memcpy(hda_mach, snd_soc_acpi_intel_hda_machines, 2 * sizeof(snd_soc_acpi_intel_hda_machines[0]));
10671067

10681068
dev_info(bus->dev, "using HDA machine driver %s now\n",
10691069
hda_mach->drv_name);

0 commit comments

Comments
 (0)