Merge remote-tracking branch 'asoc/topic/intel' into asoc-next
[cascardo/linux.git] / sound / soc / intel / skylake / skl-sst-utils.c
index 3fe939c..8dc0303 100644 (file)
@@ -123,6 +123,11 @@ int snd_skl_get_module_info(struct skl_sst *ctx,
 
        uuid_mod = (uuid_le *)mconfig->guid;
 
+       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) {
                        mconfig->id.module_id = module->id;