File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff 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 );
You can’t perform that action at this time.
0 commit comments