ASoC: acpi: fix machine driver selection based on quirk

The ACPI/machine-driver code refactoring introduced in 4.13 introduced
a regression for cases where we need a DMI-based quirk to select the
machine driver (the BIOS reports an invalid HID). The fix is just to
make sure the results of the quirk are actually used.

Fixes: 54746dabf7 ('ASoC: Improve machine driver selection based on quirk data')
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=96691
Tested-by: Nicole Færber <nicole.faerber@dpin.de>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
This commit is contained in:
Pierre-Louis Bossart 2018-01-05 14:55:33 -06:00 committed by Mark Brown
parent 20a1ea2222
commit 5c256045b8
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
1 changed files with 3 additions and 5 deletions

View File

@ -84,11 +84,9 @@ snd_soc_acpi_find_machine(struct snd_soc_acpi_mach *machines)
for (mach = machines; mach->id[0]; mach++) {
if (snd_soc_acpi_check_hid(mach->id) == true) {
if (mach->machine_quirk == NULL)
return mach;
if (mach->machine_quirk(mach) != NULL)
return mach;
if (mach->machine_quirk)
mach = mach->machine_quirk(mach);
return mach;
}
}
return NULL;