lkml.org 
[lkml]   [2014]   [Dec]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] ASoC: Intel: fix possible acpi enumeration panic
Date
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


\
 
 \ /
  Last update: 2014-12-11 09:01    [W:0.061 / U:0.580 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site