From: Kevin Strasser <kevin.strasser@intel.com>
To: alsa-devel@alsa-project.org
Cc: Liam Girdwood <lgirdwood@gmail.com>,
Vinod Koul <vinod.koul@intel.com>,
Mark Brown <broonie@kernel.org>,
Mengdong Lin <mengdong.lin@intel.com>,
Yang Fang <yang.a.fang@intel.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH] ASoC: Intel: fix possible acpi enumeration panic
Date: Wed, 10 Dec 2014 23:21:57 -0800 [thread overview]
Message-ID: <1418282517-851-1-git-send-email-kevin.strasser@intel.com> (raw)
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
next reply other threads:[~2014-12-11 7:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-11 7:21 Kevin Strasser [this message]
2014-12-11 13:20 ` Mark Brown
2014-12-11 21:55 ` Strasser, Kevin
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1418282517-851-1-git-send-email-kevin.strasser@intel.com \
--to=kevin.strasser@intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mengdong.lin@intel.com \
--cc=vinod.koul@intel.com \
--cc=yang.a.fang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®