Commit a3e620f8 authored by Keyon Jie's avatar Keyon Jie Committed by Mark Brown

ASoC: acpi: fix: continue searching when machine is ignored

The machine_quirk may return NULL which means the acpi entries should be
skipped and search for next matched entry is needed, here add return
check here and continue for NULL case.
Signed-off-by: default avatarKeyon Jie <yang.jie@linux.intel.com>
Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 8c4e7c2e
...@@ -10,11 +10,17 @@ struct snd_soc_acpi_mach * ...@@ -10,11 +10,17 @@ struct snd_soc_acpi_mach *
snd_soc_acpi_find_machine(struct snd_soc_acpi_mach *machines) snd_soc_acpi_find_machine(struct snd_soc_acpi_mach *machines)
{ {
struct snd_soc_acpi_mach *mach; struct snd_soc_acpi_mach *mach;
struct snd_soc_acpi_mach *mach_alt;
for (mach = machines; mach->id[0]; mach++) { for (mach = machines; mach->id[0]; mach++) {
if (acpi_dev_present(mach->id, NULL, -1)) { if (acpi_dev_present(mach->id, NULL, -1)) {
if (mach->machine_quirk) if (mach->machine_quirk) {
mach = mach->machine_quirk(mach); mach_alt = mach->machine_quirk(mach);
if (!mach_alt)
continue; /* not full match, ignore */
mach = mach_alt;
}
return mach; return mach;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment