From: Vinod Koul <vinod.koul@intel.com>
To: alsa-devel@alsa-project.org
Cc: liam.r.girdwood@linux.intel.com, patches.audio@intel.com,
broonie@kernel.org, Vinod Koul <vinod.koul@intel.com>,
Senthilnathan Veppur <senthilnathanx.veppur@intel.com>
Subject: [PATCH 01/12] ASoC: Intel: Skylake: Check list empty while getting module info
Date: Tue, 26 Jul 2016 18:06:39 +0530 [thread overview]
Message-ID: <1469536610-27606-2-git-send-email-vinod.koul@intel.com> (raw)
In-Reply-To: <1469536610-27606-1-git-send-email-vinod.koul@intel.com>
Module list can be NULL so check if the list is empty before
accessing the list.
Signed-off-by: Senthilnathan Veppur <senthilnathanx.veppur@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
---
sound/soc/intel/skylake/skl-sst-utils.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/sound/soc/intel/skylake/skl-sst-utils.c b/sound/soc/intel/skylake/skl-sst-utils.c
index 25fcb796bd86..ddcb52a51854 100644
--- a/sound/soc/intel/skylake/skl-sst-utils.c
+++ b/sound/soc/intel/skylake/skl-sst-utils.c
@@ -123,6 +123,11 @@ int snd_skl_get_module_info(struct skl_sst *ctx, u8 *uuid,
uuid_mod = (uuid_le *)uuid;
+ if (list_empty(&ctx->uuid_list)) {
+ dev_err(ctx->dev, "Module list is empty\n");
+ return -EINVAL;
+ }
+
list_for_each_entry(module, &ctx->uuid_list, list) {
if (uuid_le_cmp(*uuid_mod, module->uuid) == 0) {
dfw_config->module_id = module->id;
--
1.9.1
next prev parent reply other threads:[~2016-07-26 12:29 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-26 12:36 [PATCH 00/12] ASoC: Intel: Skylake: Add support for library load Vinod Koul
2016-07-26 12:36 ` Vinod Koul [this message]
2016-08-01 17:07 ` Applied "ASoC: Intel: Skylake: Check list empty while getting module info" to the asoc tree Mark Brown
2016-07-26 12:36 ` [PATCH 02/12] ASoC: Intel: Skylake: Move modules query to runtime Vinod Koul
2016-08-01 17:07 ` Applied "ASoC: Intel: Skylake: Move modules query to runtime" to the asoc tree Mark Brown
2016-07-26 12:36 ` [PATCH 03/12] ASoC: Intel: Skylake: modify skl_get_dsp_ops() Vinod Koul
2016-08-01 17:07 ` Applied "ASoC: Intel: Skylake: modify skl_get_dsp_ops()" to the asoc tree Mark Brown
2016-07-26 12:36 ` [PATCH 04/12] ASoC: Intel: Skylake: split fw and dsp initialization Vinod Koul
2016-08-01 17:07 ` Applied "ASoC: Intel: Skylake: split fw and dsp initialization" to the asoc tree Mark Brown
2016-07-26 12:36 ` [PATCH 05/12] ASoC: Intel: Skylake: add support for tplg manifest load Vinod Koul
2016-08-01 17:07 ` Applied "ASoC: Intel: Skylake: add support for tplg manifest load" to the asoc tree Mark Brown
2016-07-26 12:36 ` [PATCH 06/12] ASoC: Intel: Skylake: add additional args to module parsing Vinod Koul
2016-08-01 17:07 ` Applied "ASoC: Intel: Skylake: add additional args to module parsing" to the asoc tree Mark Brown
2016-07-26 12:36 ` [PATCH 07/12] ASoC: Intel: Skylake: Parse UUIDs once Vinod Koul
2016-08-01 17:07 ` Applied "ASoC: Intel: Skylake: Parse UUIDs once" to the asoc tree Mark Brown
2016-07-26 12:36 ` [PATCH 08/12] ASoC: Intel: Bxt: Parse UUIDs once Vinod Koul
2016-08-01 17:07 ` Applied "ASoC: Intel: Bxt: Parse UUIDs once" to the asoc tree Mark Brown
2016-07-26 12:36 ` [PATCH 09/12] ASoC: Intel: Skylake: Add library loading IPCs Vinod Koul
2016-08-01 17:07 ` Applied "ASoC: Intel: Skylake: Add library loading IPCs" to the asoc tree Mark Brown
2016-07-26 12:36 ` [PATCH 10/12] ASoC: Intel: Skylake: Add library loading support Vinod Koul
2016-08-05 11:19 ` Applied "ASoC: Intel: Skylake: Add library loading support" to the asoc tree Mark Brown
2016-07-26 12:36 ` [PATCH 11/12] ASoC: Intel: Skylake: Fix a comment style Vinod Koul
2016-08-05 11:19 ` Applied "ASoC: Intel: Skylake: Fix a comment style" to the asoc tree Mark Brown
2016-07-26 12:36 ` [PATCH 12/12] ASoC: Intel: Skylake: Add module processing domain support Vinod Koul
2016-08-05 11:18 ` Applied "ASoC: Intel: Skylake: Add module processing domain support" to the asoc tree 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=1469536610-27606-2-git-send-email-vinod.koul@intel.com \
--to=vinod.koul@intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=liam.r.girdwood@linux.intel.com \
--cc=patches.audio@intel.com \
--cc=senthilnathanx.veppur@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;
as well as URLs for NNTP newsgroup(s).