projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e7ca8fc
)
ASoC: Intel: Skylake: Check list empty while getting module info
author
Vinod Koul
<
[email protected]
>
Tue, 26 Jul 2016 12:36:39 +0000
(18:06 +0530)
committer
Mark Brown
<
[email protected]
>
Mon, 1 Aug 2016 16:23:37 +0000
(17:23 +0100)
Module list can be NULL so check if the list is empty before
accessing the list.
Signed-off-by: Senthilnathan Veppur <
[email protected]
>
Signed-off-by: Vinod Koul <
[email protected]
>
Signed-off-by: Mark Brown <
[email protected]
>
sound/soc/intel/skylake/skl-sst-utils.c
patch
|
blob
|
history
diff --git
a/sound/soc/intel/skylake/skl-sst-utils.c
b/sound/soc/intel/skylake/skl-sst-utils.c
index 25fcb796bd86414c49a08df1af445b1b4127a7a2..ddcb52a5185481057fc40b406bf3f09077b51984 100644
(file)
--- 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;