diff mbox

[v2] ASoC: Intel: fix possible acpi enumeration panic

Message ID 1418688904-26959-1-git-send-email-kevin.strasser@linux.intel.com (mailing list archive)
State Accepted
Commit de5f644e3ca71afc06377d137375c56e250f8cb3
Headers show

Commit Message

Kevin Strasser Dec. 16, 2014, 12:15 a.m. UTC
A crash can occur on some platforms where adsp is enumerated but codec is not
matched. Define codec_id as a pointer intead of an array so that it gets
initialized to NULL for the terminating element of sst_acpi_bytcr[] and
sst_acpi_chv[].

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

Comments

Mark Brown Dec. 16, 2014, 11:52 a.m. UTC | #1
On Mon, Dec 15, 2014 at 04:15:04PM -0800, Kevin Strasser wrote:
> A crash can occur on some platforms where adsp is enumerated but codec is not
> matched. Define codec_id as a pointer intead of an array so that it gets
> initialized to NULL for the terminating element of sst_acpi_bytcr[] and
> sst_acpi_chv[].

Applied, thanks.
diff mbox

Patch

diff --git a/sound/soc/intel/sst/sst_acpi.c b/sound/soc/intel/sst/sst_acpi.c
index 31124aa..87b5090 100644
--- a/sound/soc/intel/sst/sst_acpi.c
+++ b/sound/soc/intel/sst/sst_acpi.c
@@ -43,7 +43,7 @@ 
 #include "sst.h"
 
 struct sst_machines {
-	char codec_id[32];
+	char *codec_id;
 	char board[32];
 	char machine[32];
 	void (*machine_quirk)(void);