diff options
author | Ranjani Sridharan <ranjani.sridharan@linux.intel.com> | 2020-08-24 15:09:07 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2020-08-25 20:39:35 +0100 |
commit | f3e9ed5e90603db73a699bed18311f15cba71531 (patch) | |
tree | 5bfca33a7aa7cb86c04c9140164ec4f960367005 | |
parent | f738d8156d05b0331543ec097dd5d3c83465d68f (diff) |
ASoC: SOF: topology: remove unnecessary memory alloc for sdev->private
Looks like it was left over from the previous implementation of
DMIC PDM token parsing. It is not used anymore.
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200824200912.46852-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | sound/soc/sof/topology.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/sound/soc/sof/topology.c b/sound/soc/sof/topology.c index 3b4e09089643..36dc87514dce 100644 --- a/sound/soc/sof/topology.c +++ b/sound/soc/sof/topology.c @@ -2944,14 +2944,6 @@ static int sof_link_dmic_load(struct snd_soc_component *scomp, int index, return ret; } - /* - * alloc memory for private member - * Used to track the pdm config array index currently being parsed - */ - sdev->private = kzalloc(sizeof(u32), GFP_KERNEL); - if (!sdev->private) - return -ENOMEM; - /* get DMIC PDM tokens */ ret = sof_parse_token_sets(scomp, &config->dmic.pdm[0], dmic_pdm_tokens, ARRAY_SIZE(dmic_pdm_tokens), private->array, @@ -2962,7 +2954,7 @@ static int sof_link_dmic_load(struct snd_soc_component *scomp, int index, if (ret != 0) { dev_err(scomp->dev, "error: parse dmic pdm tokens failed %d\n", le32_to_cpu(private->size)); - goto err; + return ret; } /* set IPC header size */ @@ -3007,9 +2999,6 @@ static int sof_link_dmic_load(struct snd_soc_component *scomp, int index, dev_err(scomp->dev, "error: failed to save DAI config for DMIC%d\n", config->dai_index); -err: - kfree(sdev->private); - return ret; } |