Преглед на файлове

Merge remote-tracking branch 'asoc/fix/intel' into asoc-linus

Mark Brown преди 9 години
родител
ревизия
a74306fe94
променени са 2 файла, в които са добавени 8 реда и са изтрити 1 реда
  1. 5 0
      sound/soc/intel/skylake/skl-sst-utils.c
  2. 3 1
      sound/soc/intel/skylake/skl.c

+ 5 - 0
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;

+ 3 - 1
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);