ASoC: Intel: Skylake: check manifest size
authorVinod Koul <vinod.koul@intel.com>
Wed, 24 Aug 2016 12:33:13 +0000 (18:03 +0530)
committerMark Brown <broonie@kernel.org>
Thu, 1 Sep 2016 20:27:41 +0000 (21:27 +0100)
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>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/skylake/skl-topology.c

index 108ebb9ab3291ca5cf939dc7db9142cba344be5d..6bceab8f0bac3f7f6221c4b516988c8d8fc89a69 100644 (file)
@@ -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);
This page took 0.026658 seconds and 5 git commands to generate.