summaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-acpi.c
diff options
context:
space:
mode:
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>2018-01-05 14:55:33 -0600
committerMark Brown <broonie@kernel.org>2018-01-08 12:17:44 +0000
commit5c256045b87b8aa8e5bc9d2e2fdc0802351c1f99 (patch)
treeae65bbe4103c426964484bc22245ba9dc1371dce /sound/soc/soc-acpi.c
parent20a1ea2222e7cbf96e9bf8579362e971491e6aea (diff)
downloadlinux-5c256045b87b8aa8e5bc9d2e2fdc0802351c1f99.tar.bz2
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: 54746dabf770 ('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
Diffstat (limited to 'sound/soc/soc-acpi.c')
-rw-r--r--sound/soc/soc-acpi.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sound/soc/soc-acpi.c b/sound/soc/soc-acpi.c
index f21df28bc28e..d4dd2efea45e 100644
--- a/sound/soc/soc-acpi.c
+++ b/sound/soc/soc-acpi.c
@@ -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;