All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: acpi: fix: continue searching when machine is ignored
@ 2018-11-01  2:36 Keyon Jie
  2018-11-01  2:51 ` Pierre-Louis Bossart
  0 siblings, 1 reply; 5+ messages in thread
From: Keyon Jie @ 2018-11-01  2:36 UTC (permalink / raw)
  To: alsa-devel; +Cc: Keyon Jie, pierre-louis.bossart

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: Keyon Jie <yang.jie@linux.intel.com>
---
 sound/soc/soc-acpi.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/sound/soc/soc-acpi.c b/sound/soc/soc-acpi.c
index b8e72b52db30..faf8941363e4 100644
--- a/sound/soc/soc-acpi.c
+++ b/sound/soc/soc-acpi.c
@@ -15,7 +15,10 @@ snd_soc_acpi_find_machine(struct snd_soc_acpi_mach *machines)
 		if (acpi_dev_present(mach->id, NULL, -1)) {
 			if (mach->machine_quirk)
 				mach = mach->machine_quirk(mach);
-			return mach;
+
+			/* return matched machine, continue otherwise */
+			if (mach)
+				return mach;
 		}
 	}
 	return NULL;
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-11-16 13:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-01  2:36 [PATCH] ASoC: acpi: fix: continue searching when machine is ignored Keyon Jie
2018-11-01  2:51 ` Pierre-Louis Bossart
2018-11-15 23:01   ` Pierre-Louis Bossart
2018-11-16  3:03     ` Keyon Jie
2018-11-16 13:52       ` Pierre-Louis Bossart

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.