diff options
author | Mark Brown <broonie@kernel.org> | 2016-08-24 21:05:20 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-08-24 21:05:20 +0300 |
commit | a74306fe94c82429fd0ec9f4316de90b405012d2 (patch) | |
tree | 46e3a44c10634b6646559ce5aef722c98f07b1b4 /sound | |
parent | b5db6c57c9fb7068cf50e82c27886cc00b9cd78e (diff) | |
parent | 979cf59acc9d634cc140aadd0d2915947ab303cc (diff) | |
download | linux-a74306fe94c82429fd0ec9f4316de90b405012d2.tar.xz |
Merge remote-tracking branch 'asoc/fix/intel' into asoc-linus
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/intel/skylake/skl-sst-utils.c | 5 | ||||
-rw-r--r-- | sound/soc/intel/skylake/skl.c | 4 |
2 files changed, 8 insertions, 1 deletions
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; diff --git a/sound/soc/intel/skylake/skl.c b/sound/soc/intel/skylake/skl.c index cd59536a761d..e3e764167765 100644 --- a/sound/soc/intel/skylake/skl.c +++ b/sound/soc/intel/skylake/skl.c @@ -672,8 +672,10 @@ static int skl_probe(struct pci_dev *pci, skl->nhlt = skl_nhlt_init(bus->dev); - if (skl->nhlt == NULL) + if (skl->nhlt == NULL) { + err = -ENODEV; goto out_free; + } skl_nhlt_update_topology_bin(skl); |