Commit 83a3fd3c authored by Lu Guanqun's avatar Lu Guanqun Committed by Mark Brown

ASoC: sst_platform: free the resources on fail path

Signed-off-by: default avatarLu Guanqun <guanqun.lu@intel.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 0d1d7ce9
...@@ -252,6 +252,8 @@ static int sst_platform_open(struct snd_pcm_substream *substream) ...@@ -252,6 +252,8 @@ static int sst_platform_open(struct snd_pcm_substream *substream)
ret_val = register_sst_card(stream->sstdrv_ops); ret_val = register_sst_card(stream->sstdrv_ops);
if (ret_val) { if (ret_val) {
pr_err("sst: sst card registration failed\n"); pr_err("sst: sst card registration failed\n");
kfree(stream->sstdrv_ops);
kfree(stream);
return ret_val; return ret_val;
} }
runtime->private_data = stream; runtime->private_data = stream;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment