All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: Intel: fix possible acpi enumeration panic
@ 2014-12-11  7:21 Kevin Strasser
  2014-12-11 13:20 ` Mark Brown
  2014-12-16  0:15 ` [PATCH v2] " Kevin Strasser
  0 siblings, 2 replies; 8+ messages in thread
From: Kevin Strasser @ 2014-12-11  7:21 UTC (permalink / raw)
  To: alsa-devel
  Cc: Liam Girdwood, Vinod Koul, Mark Brown, Mengdong Lin, Yang Fang,
	linux-kernel

A crash can occur on some platforms where adsp is enumerated but codec
is not matched. Check that the codec_id string is valid before
attempting to match.

Signed-off-by: Kevin Strasser <kevin.strasser@intel.com>
---
 sound/soc/intel/sst/sst_acpi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/intel/sst/sst_acpi.c b/sound/soc/intel/sst/sst_acpi.c
index 31124aa..dd72e58 100644
--- a/sound/soc/intel/sst/sst_acpi.c
+++ b/sound/soc/intel/sst/sst_acpi.c
@@ -236,7 +236,7 @@ static struct sst_machines *sst_acpi_find_machine(
 	struct sst_machines *mach;
 	bool found = false;
 
-	for (mach = machines; mach->codec_id; mach++)
+	for (mach = machines; mach->codec_id[0]; mach++)
 		if (ACPI_SUCCESS(acpi_get_devices(mach->codec_id,
 						  sst_acpi_mach_match,
 						  &found, NULL)) && found)
-- 
1.9.1

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

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

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-11  7:21 [PATCH] ASoC: Intel: fix possible acpi enumeration panic Kevin Strasser
2014-12-11 13:20 ` Mark Brown
2014-12-11 21:55   ` Strasser, Kevin
2014-12-15 17:06     ` Mark Brown
2014-12-15 17:06       ` Mark Brown
2014-12-15 23:22       ` [alsa-devel] " Kevin Strasser
2014-12-16  0:15 ` [PATCH v2] " Kevin Strasser
2014-12-16 11:52   ` Mark Brown

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.