diff mbox

[1/9] ASoC: Intel: Skylake: check manifest size

Message ID 1472042001-9582-2-git-send-email-vinod.koul@intel.com (mailing list archive)
State Accepted
Commit c15ad605be164dd425c32af730376b6ad71d6cb3
Headers show

Commit Message

Vinod Koul Aug. 24, 2016, 12:33 p.m. UTC
For some platforms manifest data may not be defined, thus the private
data would not be defined as well.

So check the size of private data and proceed only if it is valid.

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
---
 sound/soc/intel/skylake/skl-topology.c | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox

Patch

diff --git a/sound/soc/intel/skylake/skl-topology.c b/sound/soc/intel/skylake/skl-topology.c
index 108ebb9ab329..6bceab8f0bac 100644
--- a/sound/soc/intel/skylake/skl-topology.c
+++ b/sound/soc/intel/skylake/skl-topology.c
@@ -2401,6 +2401,10 @@  static int skl_manifest_load(struct snd_soc_component *cmpnt,
 	struct skl *skl = ebus_to_skl(ebus);
 	int ret = 0;
 
+	/* proceed only if we have private data defined */
+	if (manifest->priv.size == 0)
+		return 0;
+
 	minfo = &skl->skl_sst->manifest;
 
 	skl_tplg_get_manifest_data(manifest, bus->dev, minfo);